diff options
| author | tangweikang <[email protected]> | 2019-12-03 15:52:39 +0800 |
|---|---|---|
| committer | tangweikang <[email protected]> | 2019-12-03 16:45:46 +0800 |
| commit | 15b10bd5e2da72a96d7ef8791a97b95ca143d757 (patch) | |
| tree | 4941a9e910b601b6f73cf45778c9dcc5fa7dc7a5 /components | |
| parent | 0dc7da688fa4d20745461b8835d3f6228fb90bf3 (diff) | |
[components][sfud] update sfud options.
Diffstat (limited to 'components')
| -rwxr-xr-x | components/drivers/Kconfig | 7 | ||||
| -rw-r--r-- | components/drivers/spi/spi_flash_sfud.c | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/components/drivers/Kconfig b/components/drivers/Kconfig index 12b82671e3..c567233c84 100755 --- a/components/drivers/Kconfig +++ b/components/drivers/Kconfig @@ -224,6 +224,13 @@ config RT_USING_SPI select RT_USING_QSPI default n + config RT_SFUD_SPI_MAX_HZ + int "Default spi maximum speed(HZ)" + range 0 50000000 + default 50000000 + help + Read the JEDEC SFDP command must run at 50 MHz or less,and you also can use rt_spi_configure(); to config spi speed. + config RT_DEBUG_SFUD bool "Show more SFUD debug information" default n diff --git a/components/drivers/spi/spi_flash_sfud.c b/components/drivers/spi/spi_flash_sfud.c index 7fa7de6ad5..ce67ce9a72 100644 --- a/components/drivers/spi/spi_flash_sfud.c +++ b/components/drivers/spi/spi_flash_sfud.c @@ -22,12 +22,17 @@ #endif /* RT_DEBUG_SFUD */ #ifndef RT_SFUD_DEFAULT_SPI_CFG + +#ifndef RT_SFUD_SPI_MAX_HZ +#define RT_SFUD_SPI_MAX_HZ 50000000 +#endif + /* read the JEDEC SFDP command must run at 50 MHz or less */ #define RT_SFUD_DEFAULT_SPI_CFG \ { \ .mode = RT_SPI_MODE_0 | RT_SPI_MSB, \ .data_width = 8, \ - .max_hz = 50 * 1000 * 1000, \ + .max_hz = RT_SFUD_SPI_MAX_HZ, \ } #endif |
