Merge pull request #7371 from PontusO/main

Initializing external flash SPI speed to SPI_FLASH_MAX_BAUDRATE, instead of using driver default speed (32MHz), before probing JEDEC identifier.
This commit is contained in:
Dan Halbert 2023-01-04 12:29:45 -05:00 committed by GitHub
commit c0c02d0e04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -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;
}