2 years ago

#31922

test-img

mefilti

How much is the minimum number of pages used with EEPROM EMULATION (AN4894) techniques?

I'm implementing eeprom emulation with the STM32G0 series microprocessor. I am using the AN4894 Application note and the X-CUBE-EEPROM(4.0.0) software, but I have encountered a problem.

AN4894 Application note

X-CUBE-EEPROM

Let me explain how I use it first. I'm recording 128 values that are 32 bits, and this value is constantly updated. For example, every time I press the button, the value increases and records this value.

As the application note says, a minimum of 2 pages can be used.

enter image description here

When I use GUARD_PAGES_NUMBER as 0, it uses 2 pages for the eeprom emulation, but the values that have been written are constantly updated, the 2-page field fills up and the change process does not occur again.

enter image description here

The value of GUARD_PAGES_NUMBER is 0, 2, 4 ... it can get its values. when I use the value 2. When updating the values, when the first 2 pages are full, the last values are copied to the other 2 pages and the values are not lost.

enter image description here

The protection of values is exactly what I want. But when I use it like this, at LEAST 4 PAGES are used. Each page is 2kb for the STM32G0 series, a total of 8kb is allocated for this process. Taking up 8kb of space for 128 values of 32 bits each is undesirable for my application.

In a scenario where the saved values can be changed periodically, but there is no data loss or flash field filling problem, I can use a minimum of how many pages. It is convenient for me to use no more than 2 pages.

embedded

stm32

microcontroller

flash-memory

eeprom

0 Answers

Your Answer

Accepted video resources