Post Reply 
[41CL] is it recommended to unplug module images during an upgrade?
03-25-2021, 07:29 PM (This post was last modified: 03-25-2021 07:32 PM by Sylvain Cote.)
Post: #7
RE: [41CL] is it recommended to unplug module images during an upgrade?
(03-25-2021 06:44 PM)cdmackay Wrote:  Ah, so you simply can't read just one page's 8KB from a flash sector, you have to read the whole 64KB sector?
No, you can read 1 byte if you want, the problem is not the reading from Flash part is the writing to Flash part.

Back to basic, when you are erasing a Flash sector, you are in reality setting all the bits in the sector to 1.
After that, you can drop 1 bit to 0 but you cannot raise it back to 1 without erasing the whole Flash sector again.

In our case the Flash sector has a size of 64KB. (putting the first/last sector exception aside for the moment here)
For our discussion let say that it contains 8 modules and of those only 1 is outdated.
It is impossible to only update the outdated module (8KB) directly in Flash because the Flash chip is only able to erase the whole sector (64KB) not part of it (8KB).
That is why we need to copy the whole sector from Flash to RAM,
then update the outdated modules in RAM, (8KB per outdated module)
erase the whole 64KB Flash sector (if we had not copied the sector in RAM previously we will have loose the other 7 modules at this step)
then we copy the update sector from RAM to Flash. (the whole 64KB)

I hope it is more clearer.

Sylvain
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [41CL] is it recommended to unplug module images during an upgrade? - Sylvain Cote - 03-25-2021 07:29 PM



User(s) browsing this thread: 2 Guest(s)