Skip to content

Commit 9f266c3

Browse files
committed
Initializing external flash SPI speed to SPI_FLASH_MAX_BAUDRATE, instead of using driver default speed (32MHz), before probing JEDEC identifier.
1 parent 2a1bb72 commit 9f266c3

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ports/nrf/boards/challenger_840/mpconfigboard.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define SPI_FLASH_MISO_PIN (&pin_P0_11)
1111
#define SPI_FLASH_SCK_PIN (&pin_P0_14)
1212
#define SPI_FLASH_CS_PIN (&pin_P0_08)
13+
#define SPI_FLASH_MAX_BAUDRATE 20000000
1314
#endif
1415

1516
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500

supervisor/shared/external_flash/spi_flash.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ void spi_flash_init(void) {
151151
supervisor_flash_spi_bus.base.type = &busio_spi_type;
152152
common_hal_busio_spi_construct(&supervisor_flash_spi_bus, SPI_FLASH_SCK_PIN, SPI_FLASH_MOSI_PIN, SPI_FLASH_MISO_PIN, false);
153153
common_hal_busio_spi_never_reset(&supervisor_flash_spi_bus);
154+
common_hal_busio_spi_configure(&supervisor_flash_spi_bus, SPI_FLASH_MAX_BAUDRATE, 0, 0, 8);
154155

155156
return;
156157
}

0 commit comments

Comments
 (0)