Store values in flash via UART2 or STLink

Question. Is there a way to store a value in a RAK3172 running RUI3 after a custom firmware is loaded?

i.e. I want to store a few bytes or words as a config value that a custom firmware can read.
Can WisToolBox or other STM programming tool be used to just program a few memory locations? Then the app read the information?


RUI3 has the Flash API that allows to read and write values from a reserved flash memory area.
Writing blindly into the flash with STLink without knowing where your code is located is dangerous. You don’t know if you overwrite code or the device factory settings (or something else) that are stored in the flash as well.

You could use the Flash API together with custom AT commands to save values in the device. I am doing this in my RUI3-Modular example code to set the automatic sending interval and save it in Flash and reload it on boot up.

@beegee, Very excellent suggestion.
I look forward to trying it.

Thank you very much.