larus-breeze / sw_sensor

Firmware for Larus sensor MK1 and MK2
3 stars 3 forks source link

EE_PageTransfer() will erase most parameters! #47

Closed MaxBaex closed 1 year ago

MaxBaex commented 1 year ago

This configuration: COMMON uint16_t VirtAddVarTab[NB_OF_VAR];

define NB_OF_VAR ((uint8_t)0x03)

and not using the VirtAddVarTab causes that all EEPROM parameters will be lost once the system initiates a flash page transfer. We probably haven't seen this yet as we are not writing a lot via the EEPROM emulation and one page contains 16KByte of data!

Only the EEPROM Parameter with the Virtual Addresses which are defined in the VirtAddVarTab will be copied during a EE_PageTransfer();

EEPROM_PARAMETER_ID needs to be mapped to VirtAddVarTab and NB_OF_VA!

MaxBaex commented 1 year ago

PERSISTENT_DATA_ENTRIES shall be assigned to NB_OF_VA Iterate over PERSISTENT_DATA and put all ids into VirtAddVarTab.