1.7.5 Programming in Dual Partition Mode
The following steps are required to program dsPIC33AK512MC510 and dsPIC33AK512MPS512 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
