1.5 Configuration Change Protection (CCP) Registers
CCP registers are used to protect system-critical I/O register settings from accidental modification, as well as Flash self-programming from accidental execution. Writing to a register under CCP is possible only after writing a specific signature/key to the CCP register, which is part of the CPU module. The values of the signatures can be found in the Configuration Change Protection subsection of the device data sheet.
There are two types of writes to a protected register, each with its key:
- protected I/O registers (the key/signature is IOREG)
- protected self-programming (the key/signature is SPM)
Some of the registers that are under the Configuration Change Protection are listed in the table below.
Register Name | Key | Functionality | |
---|---|---|---|
CLKCTRL.MCLKCTRLA | Clock Controller – Main Clock Control A | IOREG | It allows the user to select the clock source for the main clock and to output the clock |
CLKCTRL.MCLKLOCK | Clock Controller – Main Clock Lock | IOREG | It allows the user to lock the Main Clock Control registers |
RSTCTRL.SWRR | Reset Controller – Software Reset Enable | IOREG | It allows the user to apply a software Reset to the device |
IVSEL in CPUINT.CTRLA | CPU Interrupt Controller – the Interrupt Vector Select bit from the CTRLA register | IOREG | It allows the user to place the interrupt vector at the start of the application section of Flash or the start of the boot section of Flash |
NVMCTRL.CTRLA | Nonvolatile Memory Controller – the CTRLA register | SPM |
It allows the user to issue one of the next commands:
|
Changes to the protected I/O registers or bits, or execution of protected instructions are only possible after the CPU writes one of these signatures to the CCP register. The signatures are listed in the description of the CCP (CPU.CCP) register.
A code example is provided in Writing to Configuration Change Protection (CCP) Registers.