cancel
Showing results for 
Search instead for 
Did you mean: 

Save app data in STM32L4

dtarrago
Senior
Posted on March 30, 2017 at 10:47

Hello,

I would like to save application data into flash area in order to be preserved, so data should be there when removing voltage and applying voltage to device again.

Which is the best option for this purpose? How can I specify my app area in flash and which is the best area to save data in?

(I have taken a look to example in '...STM32Cube_FW_L4_V1.7.0\Projects\STM32L476RG-Nucleo\Examples\FLASH\FLASH_WriteProtection'. Maybe this is an option, by using HAL_FLASH_Program to write and (*(__IO uint32_t*)Address) to read?)

Best regards.

#stm32l4 #flash #app-data
1 REPLY 1
Nesrine M_O
Lead II
Posted on March 30, 2017 at 11:25

Hi

TARRAGO.DANIEL

,

you can protect your memory area using Proprietary Code Read-Out Protection (PCROP): protection against read and write operations on Flash and SRAM memories.

For more details about PCROB, I rocommend you to have a look to

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fccc%2Fresource%2Ftechnical%2Fdocument%2Fapplication_note%2Fgroup0%2F1f%2F99%2Fef%2Fd6%2F24%2F8d%2F44%2F08%2FDM00226247%2Ffiles%2FDM00226pdf%2Fjcr%3Acontent%2Ftranslations%2Fen.DM00226pdf

Application note.

-Nesrine-