2021-03-22 10:44 AM
I need to store a two-dimension array (uint16_t array[100][15]) in flash for power loss reservation, But since my application is big enough and my internal flash is already running out (85%), It seems to be applicable to store my array in external nor flash (which I have in my custom board).
So is there a reliable way to store my two-dimension array in the end pages of my nor flash memory for reserving?
2021-03-22 01:41 PM
Erasing and Writing typically doesn't play well with memory-mapped read.
The QSPI NOR's typically allow for relatively free-form writing, perhaps do with 4K pages/alignment.
I'd probably journal the writes across reasonably large sections, have the ability to recover the last, or perhaps use sequence numbers to data you ping-pong between two of the larger sectors (64K?). Do erase when it is more convenient, or resources run low.
2021-03-23 03:56 AM
@Community member According to your information, It is impossible to implement this functionality (At least for me). So here is an Idea :
Based on STM32F7 datasheet, we have 8 sectors of flash, the first four are 32K each. My idea is to change linker info (flash size and start address) and make the first sector (Sector0) free of code and copy my array there (actually all I need is 3KB) using Flash Emulation methods. Is it possible in your opinion? if it is OK please help me to Start changing the Linker file.
regards