1.7.5 Programming in Dual Partition Mode

The following steps are required to program dsPIC33AK512MC510 and dsPIC33AK512MPS512 devices with Dual Partition Flash:

  1. Perform a Bulk Erase of user program memory:
    1. Enter ICSP mode
    2. Bulk Erase
    3. Exit ICSP
  2. Enter ICSP mode so that the program memory address map starts at a known state:
    1. Enter ICSP mode
  3. Execute a Page Erase for UCA1, UCA2 and UCB:
    1. Bulk Erase
    2. Exit ICSP
  4. Program the FBOOT backup register location and then the FBOOT register to one of the Dual Partition modes:
    1. Enter ICSP mode
    2. Program FBOOT_BACKUP
    3. Exit ICSP Mode
    4. Enter ICSP mode
    5. Program FBOOT
    6. Exit ICSP Mode
  5. Issue a device Reset. This will split the memory into two partitions.
  6. Enter ICSP Mode:
    1. Program the first application, including its Boot Sequence Number, into the Active Partition at address, 0x800000
    2. Program the second application, including its Boot Sequence Number, into the Inactive Partition at address, 0xC00000
    3. Write User Configuration A1 backup memory
    4. Write User Configuration A2 backup memory
    5. Write User Configuration B backup memory
    6. Write User Configuration A1 primary memory
    7. Write User Configuration A2 primary memory
    8. Write User Configuration B primary memory
    9. Exit ICSP mode