cancel
Showing results for 
Search instead for 
Did you mean: 

How to save app data in non-voltage memory in STM32L4?

Issinski.Anton
Associate II
Posted on July 01, 2016 at 22:36

Hi Experts,

We would like to save some small amount of application data - about 100 bytes somewhere on the STM32L486 chip that will survive power down / power up cycle.

Before, when we were using STM32L1, I had a very simple code that was writing to and reading from the EEPROM:

// to save data:

FLASH_UnlockData();

uint32

*pu32Nvm = (uint32*) ( 0x08080000 );

pu32Nvm[0] = ... some data ...;

pu32Nvm[1] = ... some data ...;

...

FLASH_LockData();

// to read data: just read starting from 0x08080000.

Is there a similar equivalent in the STM32L4 / Cube?

#stm32l4-flash
1 REPLY 1
raptorhal2
Lead
Posted on July 02, 2016 at 23:38

Nothing identical. Options that come to mind are:

1KB one time programmable (OTP) memory

The same constant data in every application loaded

Protecting a dedicated flash memory block

Adding a battery and using backup RAM registers

Cheers, Hal