cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Flash memory Read/Write

w21685
Associate II
Posted on October 07, 2016 at 16:32

Hello,

I'm using a STM32F207 series.

I was wondering about the flash memory read/write/earse as EEPROM.

Do I have to Erase the flash memory every time before writing a data?

Thanks.

2 REPLIES 2
matic
Associate III
Posted on October 07, 2016 at 17:18

Hi.

You can program Flash by half-word each time. Location must be erased before programming. (erased state is 0xFFFF). If it is not, warning bit in FLASH->SR register is set. One exception is when you can program a non-erased location - this is when you program 0x0000. Regardless previous state, the location will be programmed to 0x0000.

Regarding to your question. No, it is not necessary to erase the whole page before programming. Just make sure that a location where you want to write is erased (0xFFFF).

w21685
Associate II
Posted on October 23, 2016 at 20:03

Thank you for your reply!