Hi,
I was reading a lot about using flash memory as data storage, but what I learned is, that many procedures are depending on the selected device. That's why I was opening this new topic, to clarify all my questions using the F5438A device.
What I know so far:
I can use the flash memory of the MSP to store user data. To do so, it's recommended to reserve memory in the linker file (*.xcl, I'm using IAR), so that the compiler doesn't save any other data in that particular memory range. To store data, I have to clear the segment I want to write, cause it's only possible to write from '1' to '0'. I found some code snipets for erasing and writing, they are working and I understand them.
But now, we reach the borders of my knowledge ;) :
The User's Guide says, that during erasing it depends, whether the code is executed in RAM or Flash. I understood that, if the code for erasing the flash memory is executed in the flash, cpu is halted during this process. Running that particular code in RAM, CPU isn't halted. Ok, so far so good.
Now my questions:
1. I can remember, that I read some time ago, that during erasing a segment I have to switch of all interrupts to protect flash cells being destroyed by a too long erasing interval. I don't find that information anymore... Is that right, or does the flash controller manage that on its own?
2. I wan't to do some data processing and communication tasks during the erase process, both of them depending on interrupts. Is that possible, by just initiating the erase cycle from RAM? In this case, if interrupts occur, are they executed although the ISR code is within (another) flash (bank)?
3. Is it an advantage if i reserve a full bank, or is it enough just sticking to segment borders while modifying the linker file?
Thanks so far for reading!