The generic_spi_flash class implements the M25P05/10/20/40/80/16/32/64/128, N25Q256A/512A/00AA and W25Q80/16/32/64/128 BV/CV serial flash memories, accessed via the SPI Interface. Different flash models using serial interface from different manufactures can be implemented by manually configure JEDEC ID, sector number and sector size attributes.
Unimplemented features:
operation waiting state
Non-8bit align SPI transfer
4-byte address mode is implemented for Micron N25Q family.
Optional attribute;
read/write access; type:
n|[iii] JEDEC standard signature. It should be configured in format like [0x20, 0x20, 0x15] for M25P16. Please refer to the hardware documentation for the correct value.
Optional attribute;
read/write access; type:
i Electronic Signature, has default value 0x13. this is not the same as, or even a subset of, the JEDEC 16-bit Electronic Signature. this is for reason of backward compatibility, only, and should not be used for new designs. It should be configured with value 0x05 for M25P05-A, 0x10 for M25P10-A, 0x11 for M25P20, 0x12 for M25P40, 0x13 for M25P80, 0x14 for M25P16, 0x15 for M25P32. 0x16 for M25P64. For all other devices not listed above, please check the respective hardware documentation.
Optional attribute;
read/write access; type:
n|[ii] Extended device identification. It is only implemented in some flash models. For those models, the two bytes are used to identify different devices. It should be configured like: [0x4d, 0x00] for S25FL032P. Please refer to the hardware documentation for the correct value.
Required attribute;
read/write access; type:
o|[os] Connects to an image object which holding the data, the size of attached object should be equal to sector_number.val * sector_size.val.
Optional attribute;
read/write access; type:
i Sector number in the whole flash, has default value 16. Please refer to the hardware documentation for the correct value.
Optional attribute;
read/write access; type:
i Bytes size for flash sector, has default value 0x10000(64 * 1024). Please refer to the hardware documentation for the correct value. For example, 0x8000 for M25P05-A