Post Reply 
[41CL] is it recommended to unplug module images during an upgrade?
03-25-2021, 09:13 PM
Post: #8
RE: [41CL] is it recommended to unplug module images during an upgrade?
thank you Sylvain, yes, that is clear, and I was aware of it.

I fear I am doing a bad job of explaining my point, sorry.

My point relates to the flash sector pages for modules that are being updated.

I am asking why we need to copy those pages from flash to RAM, only for them to be immediately overwritten in RAM by the new module image that we import from the PC.

For example, for a flash sector that has 1 outdated module imageā€¦

As you said, the current process is:

1. copy a 64KB flash block into RAM (0x810 ... 0x817)
2. update the modules in RAM that need to be updated
3. erase the 64KB flash block
4. copy RAM (0x810 ... 0x817) to the 64KB flash block

In step 1, we copy the entire 64KB sector from flash to RAM. That equates to all eight 8KB modules in that sector.

In step 2, we update the 8KB RAM page for the single module that is being updated. So that particular 8KB that we read from flash has been immediately overwritten by the 8KB module image we imported from the PC. So we didn't need to read that particular 8KB from flash at all.

My suggestion was a change to step 1 (only); changes in italics:

1. copy part of a 64KB flash block into RAM (0x810 ... 0x817). Copy only 8KB chunks for pages that are not being updated. Do not copy the 8KB chunks for pages that are about to be updated (since they will be immediately overwritten in RAM).
2. update the modules in RAM that need to be updated
3. erase the 64KB flash block
4. copy RAM (0x810 ... 0x817) to the 64KB flash block

Initially, I thought you were saying that's no good because we can only read 64KB at a time from flash. But no, I had misunderstood that, and you confirm that we can read at a byte granularity.

If the above is valid, then step 1 would be slightly faster. If several modules of that sector were being updated, it would be faster still. Perhaps it's not a worthwhile saving, given the effort involved, but I wondered.


I am probably missing something, but I don't yet see what it is Smile

thanks for reading!

Cambridge, UK
41CL/DM41X 12/15C/16C DM15/16 17B/II/II+ 28S 42S/DM42 32SII 48GX 50g 35s WP34S PrimeG2 WP43S/pilot
Casio, Rockwell 18R
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? - cdmackay - 03-25-2021 09:13 PM



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