2011-01-18 04:44 AM
writing EEPROM DATA area
2011-05-17 06:11 AM
Hi,
you can write 128 bytes locations without setting FLASH_CR2.PRG, in this case you are using byte write operation and in this case non touched cells are not erased just because you don't issue a byte write operation on them. If you want to use block write operation then you need to set FLASH_CR2.PRG, in this case you can't skip cells, but if you want these cells mantain the previous value, you need to read them and program then in the block with the old value. Have a look on this discussion and on the attachment on that discussion:[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM8/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM8/Error 42004 when writing to data flash&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009786738307FCB24DB76B09BF0FB5BB81¤tviews=74]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM8/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fSTM8%2fError%2042004%20when%20writing%20to%20data%20flash&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009786738307FCB24DB76B09BF0FB5BB81¤tviews=74 brazov22011-05-17 06:11 AM
2011-05-17 06:11 AM
Hi,
yes, when writing on DATA eeprom you benefit of RWW feature, so while writing you can continue to execute code from PROGRAM eeprom, but if you use byte write and you wirte one byte after the other, the CPU is stalled when a byte write is on going and it tries to execute another byte write. About the question the answer is yes, 7 bytes write take around 7x4ms, unless you use block write that takes about 4 ms for 128 byte write in one shot. brazov22011-05-17 06:11 AM