1.7.5 Programming in Dual Partition Mode
The following steps are required to program dsPIC33AK256MPS306 devices with dual partition Flash:
- Perform a bulk erase of user
program memory:
- Enter ICSP mode.
- Bulk Erase.
- Exit ICSP.
- Enter ICSP mode so that the program memory address map starts at a known
state:
- Enter ICSP mode.
- Execute a page erase for UCA1,
UCA2 and UCB:
- Bulk Erase.
- Exit ICSP.
- Program the FBOOT backup register location and then the FBOOT register to one of
the Dual Partition modes:
- Enter ICSP mode.
- Program FBOOT_BACKUP.
- Exit ICSP mode.
- Enter ICSP mode.
- Program FBOOT.
- Exit ICSP mode.
- Issue a device Reset. This will split the memory into two partitions.
- Enter ICSP mode:
- Program the first application, including its boot sequence number, into the active partition at address, 0x800000.
- Program the second application, including its boot sequence number, into the inactive partition at address, 0xC00000.
- Write User Configuration A1 backup memory.
- Write User Configuration A2 backup memory.
- Write User Configuration B backup memory.
- Write User Configuration A1 primary memory.
- Write User Configuration A2 primary memory.
- Write User Configuration B primary memory.
- Exit ICSP mode.
