1.4 Configuration Bits

The Configuration bits are stored in the User Configuration Ax and User Configuration B Flash memory areas. These bits can be programmed (= 0) or erased (= 1) to select various device configurations. There are two types of Configuration bits: system operation bits and code-protect bits. The system operation bits determine the power-on settings for system-level components, such as the Watchdog Timer. The code-protect bits prevent program memory from being read and written. Table 1-7 lists the Configuration Words of the dsPIC33AK512MC510 and dsPIC33AK512MPS512 family devices. Refer to the device data sheet for the full Configuration Word register descriptions.

In addition, both the two regions (in single boot) and the three regions (in dual boot) also have a backup copy. The configuration data are automatically loaded from the Flash Configuration Words to the proper Configuration Shadow registers during device Resets. The locations of the CFGA1, CFGA2 and CFGB registers and their backups are shown in Table 1-7. The primary and backup registers should be programmed at the same time or following the order described in Programming in Dual Partition Mode.

Table 1-7. Configuration Words
Configuration Word NameAddressBackup Location Address Configuration AreaDescription
FCP0x7F30000x7F3800UCA1(1)This Configuration Word enables the Flash protection.
FICD0x7F30100x7F3810Debugger Configuration register.
FDEVOPT0x7F30200x7F3820This word configures some peripherals’ features.
FWDT0x7F30300x7F3830This Configuration Word controls the Watchdog Timer.
FPRCTRL00x7F40000x7F4800UCBThese Configuration Words allow definitions of up to eight memory regions with limitations on different Flash operations. FPRCTRLx Word enables the region and specifies what kind of Flash access should be restricted (erase, programming, reading, CRC calculation and so on). FPRSTx and FPRENDx should be programmed with the addresses of the first and last 4-Kbyte pages included in the region.
FPRST00x7F40040x7F4804
FPREND00x7F40080x7F4808
FPRCTRL10x7F40100x7F4810
FPRST10x7F40140x7F4814
FPREND10x7F40180x7F4818
FPRCTRL20x7F40200x7F4820
FPRST20x7F40240x7F4824
FPREND20x7F40280x7F4828
FPRCTRL30x7F40300x7F4830
FPRST30x7F40340x7F4834
FPREND30x7F40380x7F4838
FPRCTRL40x7F40400x7F4840
FPRST40x7F40440x7F4844
FPREND40x7F40480x7F4848
FPRCTRL50x7F40500x7F4850
FPRST50x7F40540x7F4854
FPREND50x7F40580x7F4858
FPRCTRL60x7F40600x7F4860
FPRST60x7F40640x7F4864
FPREND60x7F40680x7F4868
FPRCTRL70x7F40700x7F4870
FPRST70x7F40740x7F4874
FPREND70x7F40780x7F4878
FIRT0x7F40800x7F4880This word enables the Immutable Root of Trust Regions mode.
FSECDBG0x7F40900x7F4890This word enables the Secure Debug mode.
FTPED0x7F40A00x7F48A0This word allows permanently disabling Chip Erase and external programming.
FEPUCB0x7F40B00x7F48B0Writing 0x84C1F396 in this Configuration Word disables the erase operation on the UCB area.
FWPUCB0x7F40C00x7F48C0Writing 0x5B9B12E4 in this Configuration Word disables the programming operation on the UCB area.
FBOOT0x7F40D00x7F48D0This word allows the selection between single and dual boot modes.
FCP0x7FB0000x7FB800UCA2(1)This Configuration Word enables the Flash protection.
FICD0x7FB0100x7FB810Debugger Configuration Register.
FDEVOPT0x7FB0200x7FB820This word configures some peripherals' features.
WDT0x7FB0300x7FB830This Configuration Word controls the Watchdog Timer.
Note:
  1. When operating in dual boot mode, Dual Boot Devices have two UCA pages: UCA1 for partition1 and UCA2 for partition2.