cancel
Showing results for 
Search instead for 
Did you mean: 

STM8AL3168 EEPROM/Flash questions

Nebokhodenko
Visitor

Hello

I have a few questions about the EEPROM organization & specific corner cases of using with respect to programming manual.

1) What is the exact organization of EEPROM? It is clear that it can be written with 1 byte, 4 bytes (word) and 128 bytes (page/bank). As i deduced from programming manual:

Nebokhodenko_0-1761737127566.png

Q1: It says that for 1 byte it basically reads out a 32bit sequence, changes a byte and writes it back, is it correct?
What if we are to change some 32 bit value which is not aligned within this 32-bit word sequences?
I.e.: 00 00 0xf2 0xf3 | 0xf4 0xf5 00 00 
say 0xf2f3f4f5 would be changed to 0x11111111.
Q2: Would the operation take twice as long as writing 2 words?

2) What's the state of the *corrupt* memory? Say we were writing a byte, a reset or power drop occured, we restart and have to read out this very data.
Q3: Would the data be read? Or would it cause an unexpected behavior of some kind?

3) Same as 2, but for the operation of erase. Something occured while erasing, we wake up, try to access the *corrupted* data:
Q4: Would the data be accessed, read, or some other behavior would take place.

Q5: Is the flag about *finishing* writing relevant after power cycle? Same example, write operation interrupted by smth, we wake up. Would checking this flag indicate that write operation is not finished, or would it be in its reset value and wouldn't show anything?

Thank you in advance
Volodymyr

0 REPLIES 0