Skip to main content
RDe R.1
Associate
September 19, 2022
Question

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

  • September 19, 2022
  • 2 replies
  • 836 views

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. 

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
September 19, 2022

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 VenmoUp vote any posts that you find helpful, it shows what's working..
RDe R.1
RDe R.1Author
Associate
September 19, 2022

Nucleo32-L432 (STM32L432)