2013-08-19 09:36 AM
Hello,
I'm a newbie with microcontrolers and their memories. I want to manipulate several big tables (around 50kBytes), that mean I want to access to theses data and change their values.Of course the RAM memory of my STM32F407 is not enough to store all theses tables.Is it possible to simply declare these tables in the flash memory, and to ensure that operations are performed on the flash memory ?Thanks !Jean2013-08-19 10:00 AM
You'd need to manage the erase/write operation on flash manually.
2013-08-19 12:00 PM
Clive's described the, ''how'' - but perhaps we should visit the, ''why?''
Manipulating data w/in flash is far more demanding - and vastly more time/resource consuming - than impacting identical data - stored on chip in sram. And certain M4's here have nearly 200K of sram. Minus supporting/amplifying argument - suspect that those ''manipulations'' are better done w/in internal or external sram - and the flash be used for ''post manipulation'' data storage...2013-08-19 03:21 PM
I would second that.
The internal flash is not meant to be continuously erased and reprogramed.This is better suited to external SPI parts that can handle a million erase cycles.Better to cache the data in RAM (with an F4) then write back to SPI EEPROM when changes are detected.2013-08-20 03:50 AM
Thanks for theses details, you answered my doubts.
Because I need to operate on my tables quite frequently (like each 5ms) I think I can't work on the flask memory - so I need to find solution to reduce the tables memory space. Maybe with a linked list.Another question: I read that in microcontrolers, the software is stored and works on the flash memory. This means, if I have a 192kb of ram in my uC, this is close to 192kb of ram memory for my variables ?2013-08-20 06:04 AM
I would second that.
The internal flash is not meant to be continuously erased and reprogramed.
not meant to, it will even 'die' after, dependong on chip. after 1000 or 10000 erases. Erik