cancel
Showing results for 
Search instead for 
Did you mean: 

Possible Memory Mapping Scheme for IAP

partymarty6969
Associate II
Posted on February 22, 2005 at 23:12

Possible Memory Mapping Scheme for IAP

1 REPLY 1
partymarty6969
Associate II
Posted on May 17, 2011 at 12:06

Hello,

Is it possible in PSDSoft to declare one of the flash memory banks as program and data space at the same time? I ask because in the data sheets they mention a little something about combined space modes. Let me illustrate with an example;

At Power-up: (Page 0)

Code Space:

Fs0: 0x0000 – 0x7FFF

Csboot: 0x8000 – 0xFFFF

Data Space:

Fs1: 0x8000 – 0xFFFF

After 1st IAP: (Page 1)

Code Space:

Fs1: 0x0000 – 0x7FFF

Csboot: 0x8000 – 0xFFFF

Data Space:

Fs0: 0x8000 – 0xFFFF

The reason I ask is because I’m trying to have one image of the application in memory at all times so that if IAP fails, I have something there to rollback to. I’ll start by JTAGing to store the initial program in fs0 and the bootloader in csboot. First time I’ll update fs1, if it fails, status bytes never change, load fs0. If the update is successful, set fs1 status byte to good, fs0 status byte to bad and load fs1 (Page 1). The second time I’ll update fs0, if it fails, status bytes never change, load fs1. If the update is successful, update the status bytes and load fs0 (Page 0). Etc….

Thanks