Sequence for Write Operation to Configuration Change Protected I/O Registers

In order to write to registers protected by CCP, these steps are required:

  1. 1.The software writes the signature that enables change of protected I/O registers to the CCP bit field in the CPU.CCP register.
  2. 2.Within four instructions, the software must write the appropriate data to the protected register.

    Most protected registers also contain a Write Enable/Change Enable/Lock bit. This bit must be written to ‘1’ in the same operation as the data are written.

    The protected change is immediately disabled if the CPU performs write operations to the I/O register or data memory, if load or store accesses to Flash, NVMCTRL, or EEPROM are conducted, or if the SLEEP instruction is executed.