Storing variables to non-volatile flash on STM32L432KCU?
I have a routine that self-calibrates a system and returns two uint16_t values that I need to write into non-volatile memory and read at bootup.
The values will only be written once during production so write time isn't important. And it needs to be possible to overwrite (erase then write) them if hardware is swapped out.
I'm fairly beginner/intermediate on the software part but I understand I need to emulate some flash as EEPROM and erase full pages before writing again. I'm not entirely sure how to figure out what addresses are safe to use.
Could anyone point me to a tutorial or provide some example code? Currently using HAL libraries and generating the project from STM32CubeMX. I have not implemented any "middleware" yet which is mostly what I'm stuck at so any help finding the files and moving the correct ones into my correct project directories would be super helpful.
TIA
