2022-12-23 08:44 AM
Hello all,
I'd like to use a portion of my FLASH memory to save four 16-bit preset values. I've read that some STM have several Flash Type Program such as byte, halfword, etc.
Unfortunately, it seems that the L432KC only authorizes double word type.Therefore how should I handle this situation?
Also is it mandatory to modify my linker file to protect the memory area I plan to use (the last memory page located at address 0x0803F800)? If so, would someone have an example for me to learn from?
Thanks a lot for your help,
Emmanuel
2022-12-23 01:32 PM
How often do you plan to change those values in the product life? Are they all changed together or independently? It won't hurt to write a 16-bit value as a double-word with the 64-16 upper bits zero (or even a checksum/error correction code).
hth
KnarfB
2022-12-23 02:07 PM
Not mandatory, but will catch situations where your app code hits the ceiling.
Create and write a larger structure, or separate the words with a wider stride
2022-12-23 10:31 PM
Not very often. It's a proof of concept of a digital FM tuner (I know it already exists but it is done in the framework of an embedded course). Thanks for your advice.
2022-12-23 10:34 PM
Understood.
Could you recommend an example of modified linker file available somewhere on the web for me to have a look at it?
Thanks for your advice.
2022-12-24 06:04 AM
MEMORY
{
...
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 256K - 2K
}