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.
addr4b_enabled
Optional attribute;
read/write access; type:
b Enable 4-byte address mode.
dual_parallel_enabled
Optional attribute;
read/write access; type:
b Device represents two instances in dual parallel mode.
elec_signature
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.
extended_id
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.
fcmd_counter
Optional attribute;
read/write access; type:
[i{256}] Array of the commands statistic counters.
fpdi_enabled
Optional attribute;
read/write access; type:
b Enable DUAL INPUT FAST PROGRAM Command. Please refer to the hardware documentation to set True.
fpqi_enabled
Optional attribute;
read/write access; type:
b Enable QUAD INPUT FAST PROGRAM Command. Please refer to the hardware documentation to set True.
frdo_enabled
Optional attribute;
read/write access; type:
b Enable DUAL OUTPUT FAST READ Command. Please refer to the hardware documentation to set True.
frqo_enabled
Optional attribute;
read/write access; type:
b Enable QUAD OUTPUT FAST READ Command. Please refer to the hardware documentation to set True.
mem_block
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.
Required interfaces: image.
pp_buffer
Optional attribute;
read/write access; type:
d|n buffer for holding page program data
sector_lock
Optional attribute;
read/write access; type:
d The SPM1 lock registers.
sector_number
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.
sector_size
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
sfdp_data
Optional attribute;
read/write access; type:
[i*] Array for storing headers and data for sfdp tables.
sfdp_flash_size
Optional attribute;
read/write access; type:
i Size of flash memory which is stored in basic SFDT table.
sfdp_tables_num
Optional attribute;
read/write access; type:
i Total number of SFPD tables.