diff --git a/ports/nrf/boards/challenger_840/mpconfigboard.h b/ports/nrf/boards/challenger_840/mpconfigboard.h index e68fbc76fb..5226c818d4 100644 --- a/ports/nrf/boards/challenger_840/mpconfigboard.h +++ b/ports/nrf/boards/challenger_840/mpconfigboard.h @@ -10,6 +10,7 @@ #define SPI_FLASH_MISO_PIN (&pin_P0_11) #define SPI_FLASH_SCK_PIN (&pin_P0_14) #define SPI_FLASH_CS_PIN (&pin_P0_08) +#define SPI_FLASH_MAX_BAUDRATE 20000000 #endif #define CIRCUITPY_AUTORELOAD_DELAY_MS 500 diff --git a/supervisor/shared/external_flash/spi_flash.c b/supervisor/shared/external_flash/spi_flash.c index b47508e051..abff343713 100644 --- a/supervisor/shared/external_flash/spi_flash.c +++ b/supervisor/shared/external_flash/spi_flash.c @@ -151,6 +151,7 @@ void spi_flash_init(void) { supervisor_flash_spi_bus.base.type = &busio_spi_type; common_hal_busio_spi_construct(&supervisor_flash_spi_bus, SPI_FLASH_SCK_PIN, SPI_FLASH_MOSI_PIN, SPI_FLASH_MISO_PIN, false); common_hal_busio_spi_never_reset(&supervisor_flash_spi_bus); + common_hal_busio_spi_configure(&supervisor_flash_spi_bus, SPI_FLASH_MAX_BAUDRATE, 0, 0, 8); return; }