Skip to main content
Steven Bébin
Associate III
May 7, 2018
Question

Rewrite on a flash memory

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
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
May 7, 2018
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 (See Profile) Up vote any posts that you find helpful, it shows what's working..