You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question: Does Embassy support unlocking / reading / writing to INTERNAL EEPROM memory in devices such as the STM32L0xx and STM32Lxx series?
These devices are described as having (for example):
Memories
– Up to 192-Kbyte Flash memory with ECC (2 banks with read-while-write capability)
– 20-Kbyte RAM
– 6 Kbytes of data EEPROM with ECC
or again:
The non-volatile memory is divided into three arrays:
– 128 or 192 Kbytes of embedded Flash program memory
– 6 Kbytes of data EEPROM
– Information block containing 32 user and factory options bytes plus Kbytes of system memory
Flash program and data EEPROM are divided into two banks. This allows writing in one
bank while running code or reading data from the other bank. (p.26)
30 year data retention and 100 k write cycles are also mentioned.
The ST Reference Manual RM0367 describes in the code examples Appendix on pages 973-979 how to write to EEPROM (and FLASH ) using C. e.g.
A.3.1 Unlocking the data EEPROM and FLASH_PECR register code example
A.3.2 Locking data EEPROM and FLASH_PECR register code example
A.3.5 Write to data EEPROM code example
A.3.6 Erase to data EEPROM code example
and then for FLASH memory:
A.3.9 Program a single word to Flash program memory code example
A.3.10 Program half-page to Flash program memory code example
A.3.11 Erase a page in Flash program memory code example
A.3.12 Mass erase code example
The example code for writing a byte (or 2, or 4 bytes) is given below:
A.3.5 Write to data EEPROM code example
*(uint8_t *)(DATA_E2_ADDR+i) = DATA_BYTE;
*(uint16_t *)(DATA_E2_ADDR+j) = DATA_16B_WORD;
*(uint32_t *)(DATA_E2_ADDR) = DATA_32B_WORD;
DATA_E2_ADDR is an aligned address in the data EEPROM area.
i can be any integer.
j must be an even integer
Question: Does Embassy support unlocking / reading / writing to INTERNAL EEPROM memory in devices such as the STM32L0xx and STM32Lxx series?
These devices are described as having (for example):
or again:
30 year data retention and 100 k write cycles are also mentioned.
Reference: https://www.mouser.com/datasheet/2/389/stm32l082kb-1851150.pdf
The ST Reference Manual RM0367 describes in the code examples Appendix on pages 973-979 how to write to EEPROM (and FLASH ) using C. e.g.
and then for FLASH memory:
The example code for writing a byte (or 2, or 4 bytes) is given below:
A.3.5 Write to data EEPROM code example
Reference: https://www.st.com/resource/en/reference_manual/rm0367-ultralowpower-stm32l0x3-advanced-armbased-32bit-mcus-stmicroelectronics.pdf
The text was updated successfully, but these errors were encountered: