Reputation: 139
When I perform half page write from flash memory to flash memory on stm32 microcontroller do I need a RAM buffer to keep those read values and then write them? I mean that I have 2 separate flash areas and I want to copy some data from 1st area to the 2nd one. And do I need to create buffer and firstly read one phalf page and then write it or can I do it simultaneously?
EDIT: I want to perform flash page copy - copy a block of memory in flash to different address also in flash
Upvotes: 1
Views: 1428
Reputation: 139
The answer is that I need to cope data to temporal buffer first, because while writing to flash, reading operation is stalled, so there is no way to read from different page.
Upvotes: 2
Reputation: 1441
If you need to keep the other half of the data in the destination flash page then you'll need to read them first before erasing the page and copying half of the source page. Then you write the data temporarily stored back again.
Otherwise you can just erase page and write the half of the source page.
Note that if you loose power you'll loose the temporary stored data.
Upvotes: 2