Hi, I am using a cortex M0 microcontroller, after reset the flash memory addresses are initilazed to 0xFFFFFFFF, Is it possible to initialize an address to ZERO once at programming stage ? That means if I change the value of this address at execution, it should keep the last written value, even after a reset.
regards,
It depends on the processor that has the cortex M0 microcontroller as the core.
Do you know what you are actually saying?
"after reset the flash memory addresses are initilazed to 0xFFFFFFFF,"
I would expect the flash memory to keep the content after reset, since flash is per definition non-volatile. Maybe you were talking about the RAM?
Sorry, i want to say " after ERASING the flash memory (at programming ), all non used addresses are initilazed to 0xFFFFFFFF "
FI : I am using STM32F0 microcontroller,
Is it possible to initialize an address to ZERO once at programming stage ?
Yes.
The normal state for a flash cell is high, you can program it to any level you want, but it is a one way trip to zero. The use of hamming or error correcting codes may further limit your options for change.
The design isn't going to change to accommodate your preference for it to be zero in the erased state, so you'll need to adapt your code, and strategy, to deal with that.
View all questions in Keil forum