Em_EEPROM configuration structure.
Data Fields | |
uint32_t | eepromSize |
The size of data in bytes to store in the Em_EEPROM. More... | |
uint32_t | simpleMode |
Simple mode, when enabled (1 - enabled, 0 - disabled), means no additional service information is stored by the Em_EEPROM middleware like checksums, headers, a number of writes, etc. More... | |
uint32_t | wearLevelingFactor |
The higher the factor is, the more flash is used, but a higher number of erase/write cycles can be done on Em_EEPROM. More... | |
uint8_t | redundantCopy |
If enabled (1 - enabled, 0 - disabled), a checksum (stored in a row) is calculated on each row of data, while a redundant copy of Em_EEPROM is stored in another location. More... | |
uint8_t | blockingWrite |
If enabled (1 - enabled, 0 - disabled), the blocking writes to flash are used in the design. More... | |
uint32_t | userFlashStartAddr |
The address of the flash storage. More... | |
uint32_t cy_stc_eeprom_config_t::eepromSize |
The size of data in bytes to store in the Em_EEPROM.
The size is rounded up to a full Em_EEPROM row size. The row size is specific for a device family. Refer to the specific PSoC device datasheet.
Note this size is often smaller than the total amount of flash used for the Em_EEPROM storage. The Em_EEPROM storage size depends on the Em_EEPROM configuration and can be bigger because increasing flash endurance (wear-leveling) and restoring corrupted data from a redundant copy. Refer to the Em_EEPROM Storage Variable Location and Size section for size calculation equations. For convenience, use the CY_EM_EEPROM_GET_PHYSICAL_SIZE macro to get the needed storage size depending on the configuration.
uint32_t cy_stc_eeprom_config_t::simpleMode |
Simple mode, when enabled (1 - enabled, 0 - disabled), means no additional service information is stored by the Em_EEPROM middleware like checksums, headers, a number of writes, etc.
Data is stored directly by the specified address. The size of Em_EEPROM storage is equal to the number of byte specified in the eepromSize parameter rounded up to a full row size CY_EM_EEPROM_FLASH_SIZEOF_ROW. The wear leveling and redundant copy features are disabled, i.e. wearLevelingFactor and redundantCopy parameters are ignored.
uint32_t cy_stc_eeprom_config_t::wearLevelingFactor |
The higher the factor is, the more flash is used, but a higher number of erase/write cycles can be done on Em_EEPROM.
Multiply this number by the datasheet write endurance spec to determine the max of write cycles.
The amount of wear leveling from 1 to 10. 1 means no wear leveling is used.
uint8_t cy_stc_eeprom_config_t::redundantCopy |
If enabled (1 - enabled, 0 - disabled), a checksum (stored in a row) is calculated on each row of data, while a redundant copy of Em_EEPROM is stored in another location.
When data is read, first the checksum is checked. If that checksum is bad, and the redundant copy's checksum is good, the copy is restored.
uint8_t cy_stc_eeprom_config_t::blockingWrite |
If enabled (1 - enabled, 0 - disabled), the blocking writes to flash are used in the design.
Otherwise, non-blocking flash writes are used. From the user's perspective, the behavior of blocking and non-blocking writes are the same - the difference is that the non-blocking writes do not block the interrupts.
uint32_t cy_stc_eeprom_config_t::userFlashStartAddr |
The address of the flash storage.
The storage start address is filled to the Emulated EEPROM configuration structure and then the structure is passed to the Cy_Em_EEPROM_Init() function.