Skip to content

Commit

Permalink
so we can use the same file for rp2040 and rp2350
Browse files Browse the repository at this point in the history
  • Loading branch information
udo-munk committed Sep 30, 2024
1 parent 50721ff commit 9852e57
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 7 additions & 0 deletions picosim/rp2040/disks.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,16 @@ static spi_t spi = {
.sck_gpio = SD_SPI_CLK,
.mosi_gpio = SD_SPI_SI,
.miso_gpio = SD_SPI_SO,
#if PICO_RP2040
//.baud_rate = 125 * 1000 * 1000 / 8, /* 15.625 MHz */
//.baud_rate = 125 * 1000 * 1000 / 6, /* 20.833333 MHz */
.baud_rate = 125 * 1000 * 1000 / 4, /* 31.25 MHz */
#endif
#if PICO_RP2350
//.baud_rate = 150 * 1000 * 1000 / 8, // 18.75 MHz
//.baud_rate = 150 * 1000 * 1000 / 6, // 25.00 MHz
.baud_rate = 150 * 1000 * 1000 / 4, // 37.50 MHz
#endif
.spi_mode = 3,
.set_drive_strength = true,
.mosi_gpio_drive_strength = GPIO_DRIVE_STRENGTH_8MA,
Expand Down
8 changes: 7 additions & 1 deletion picosim/rp2350/disks.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,16 @@ static spi_t spi = {
.sck_gpio = SD_SPI_CLK,
.mosi_gpio = SD_SPI_SI,
.miso_gpio = SD_SPI_SO,
#if PICO_RP2040
//.baud_rate = 125 * 1000 * 1000 / 8, /* 15.625 MHz */
//.baud_rate = 125 * 1000 * 1000 / 6, /* 20.833333 MHz */
.baud_rate = 125 * 1000 * 1000 / 4, /* 31.25 MHz */
#endif
#if PICO_RP2350
//.baud_rate = 150 * 1000 * 1000 / 8, // 18.75 MHz
//.baud_rate = 150 * 1000 * 1000 / 6, // 25.00 MHz
.baud_rate = 150 * 1000 * 1000 / 4, // 37.50 MHz
//.baud_rate = 150 * 1000 * 1000 / 2, // 75.00 MHz
#endif
.spi_mode = 3,
.set_drive_strength = true,
.mosi_gpio_drive_strength = GPIO_DRIVE_STRENGTH_8MA,
Expand Down

0 comments on commit 9852e57

Please sign in to comment.