cancel
Showing results for 
Search instead for 
Did you mean: 

Rewrite on a flash memory

Steven Bébin
Associate III
Posted on May 07, 2018 at 14:33

Hello, I am currently a French student placement and I program card NUCLEO-144 STM32F767ZI. 

I have some problems on the flash memory. I can write to the flash memory, read from the flash memory and erase a sector of the flash memory. 

However, I can not rewrite to flash memory because of one or logical. 

I tried several things like writing 0xFF or 0x00 but without result.

I would like to know if we can erase the flash memory on an address or if we are forced to operate by sector.

If someone else has another solution, I am a taker.

Thank you in advance for your feedback,

Steven.

#rewrite-flash-memory
1 REPLY 1
Posted on May 07, 2018 at 15:24

You have to erase the sector, you cannot rewrite a memory location a second time. If you are writing data structures that are changing consider journalling them across the available space, and then reading the last structure written.

The flash write involves more bits than you can see, the array has some additional error checking/correcting or parity bits.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..