cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to log data in internal flash?

esp_abhishek
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions

No.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
ONadr.1
Senior III

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.

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

No.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

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.