Can I write single bit to EEPROM and count it as 1/8 of write cycle of 100k EEPROM write cycles in case of internal stm32l073 EEPROM?
Hello,
When I clear eeprom byte to 0xff I count it as single clear. Now when I write value to this byte I count it as single write. So according to RM I have 100k of safe read write operations like that.
Can I assume that writting single bit to this byte is one eighth of this write operation?
so:
- Perform clear = byte is equal to 0xff
- Write 0x7F = clear MSb
- Write 0x3F = clear nex bit
- and so on
- write 0x01 = only one bit left
- write 0x00 = whole byte is cleared.
Can I assume above procedure as single clear/write cycle? And safely execute 100k times?
I need to count and store 100000000 events in system (number of them). By using 8 bits for 100k cycles I only need 125 bytes to track those events. If I use uint32_t to store that I would have to use 4MB to safely store that event counter.
I cant find in documentation if when I write byte, internal controller always clears this byte and writes new one, or just writes new value.
Unfortunately I think, that always clear option is used becouse this looks like internal controller just clears cell and enters new value without explicit clear/write:
HAL_FLASHEx_DATAEEPROM_Unlock();
FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE);
*(__IO uint32_t *)Address = Data;
FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE);
HAL_FLASHEx_DATAEEPROM_Lock();Thanks
Maciek
