cancel
Showing results for 
Search instead for 
Did you mean: 

Need help storing variables in internal flash Nucleo32-L'"ékc

RDe R.1
Associate

Hi all,

I'm discovering 32-bit microcontrollers for the first time. My project is almost completely working (using Timer 1 in input capture mode and all the rest is GPIO related).

I want to save one variable so that it survives power down. Because there's no EEPROM, I need to store it in Flash.

I'm really struggling to find out how to use the (HAL) FLASH. So is there really no step-by-step guide that explains clearly and simply how to do that? The more I search about it now, the more confusing it becomes for me. 

2 REPLIES 2

Nucleo32-L'"ékc

What part, just seeing gibberish characters.

To write data, you must first erase the page in which you're storing the data, then write the new data

Pick a page out beyond that used by your application, and shrink the space you tell the linker it has, so it doesn't try to use it too.

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

Nucleo32-L432 (STM32L432)