RIOT
RIOT copied to clipboard
mtd_spi_nor: Use SFDP for SPI NOR flash parameter autodiscovery
Contribution description
JEDEC has a standardized device information tables for serial flash chips. This PR adds limited support for reading these tables and configure the flash parameters based on these tables. The number of address bytes, the chip size, and supported erase sizes with wait times are discovered from the flash.
A flag is added to disable this to allow for manual configuration.
A downside of this change is that most SPI NOR flash parameters have to reside in the MCU memory.
Testing procedure
This can be tested using examples/filesystem
, the board should behave as before this PR, except that less compile time configuration is required.
Some SPI NOR flash chips, such as Winbond chips, do not support this. I've added a flag so that manual configuration is still possible. This is also the case for the Mulle board.
Issues/PRs references
None.