/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Write and Read on flash STM32

Username:     
Password:     
             

Forum

# 1   2011-08-22 10:12:42 Write and Read on flash STM32

azer
New member
Registered: 2011-06-27
Posts: 4

Write and Read on flash STM32

bonjour, je dois lire et ecrire sur la memoire propre du STM32.

mon application a besoin de stocker des valeurs qui sont les calibrations de l'appareil.

je m'explique, je dois brancher une premiere fois mon Primer2,lancer mon programme, faire les calibrations et ensuite me servir  des valeurs que j'ai stocker dans la memoire pour faire tourner mon application.

le probleme se pose lors de la desalimentation de mon Primer 2. il faut absolument que ces valeurs stocké dans la memoire soit de nouveau accesssible lors de la mise sous tension.

comment faire? j'ai regarder dans les librar CMSIS, mais je ne trouve pas mon bonheur....


Hello, I have to read and write on the memory STM32 own.

my application needs to store values ​​that are the calibrations of the device.

Let me explain, I have to connect a first time my Primer2, run my program, do the calibrations and then I use the values ​​I store in the memory to run my application.

the problem arises when de-energized my Primer 2. it is imperative that these values ​​stored in the memory is accessible by a back in the power.

how? I look in the librar CMSIS, but I can not find my happiness ....

Offline

 

# 2   2011-08-23 06:08:10 Write and Read on flash STM32

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Write and Read on flash STM32

Two solutions :
- using the backup registers which are saved by the battery; for this, use the CirleOS API UTIL_ReadBackupRegister and UTIL_WriteBackupRegister (the register number is defined in "circle_platform.h"), while the battery jumper is ON.
- writing values into a reserved flash area, as in EEprom : take a look at the AN2594 ST application note http://www.st.com/internet/com/TECHNICA … 165693.pdf

Offline

 

Board footer