2024-01-15 09:01 PM
Hii everyone,
I am facing the problem for the data logging in flash.i am not able to keep track of the variable till where the flash memory is filled is there any way to sort out this problem. i am not able to erase the single word to update the address at particular location after writing to the flash instead whole sector is getting erased.
Solved! Go to Solution.
2024-01-16 12:32 AM
No.
2024-01-15 11:18 PM
Logging into internal FLASH is not a very good idea. This memory has a very limited number of writes, and then its cells simply stop working. Far better is logging to external memory connected via I2C or SPI.
2024-01-16 12:20 AM
i understand but for temporary purpose i want to use internal flash. one question is it possible to erase single word instead of whole sector in stm32h743 controller
2024-01-16 12:32 AM
No.
2024-01-16 12:33 AM - edited 2024-01-16 12:40 AM
Only the entire block can be erased, so before writing, the data from the erased block must be copied to RAM, modified, erase block, and then write data from RAM to this block.
Edit:
There is one more way. Do not modify old data, but only incrementally add new data. Before the first write, the block is erased and then only written incrementally without changing the already written data. Although this method is less clear for log reading, it is sufficient for a temporary log and better for Flash memory.