17.4.2.2 Write Access Protection Management

Peripheral access control can be enabled or disabled by writing to the Write Control (WRCTRL) register.

The data written to the WRCTRL register are composed of two fields: WRCTRL.PERID and WRCTRL.KEY. WRCTRL.PERID is a unique identifier corresponding to a peripheral. WRCTRL.KEY is a key value that defines the operation to be done on the access control bit. These operations can be “clear protection”, “set protection”, and “set and lock protection bit”.

The “clear protection” operation removes the write access protection for the peripheral selected by WRCTRL.PERID. Write accesses are allowed for the registers in this peripheral.

The “set protection” operation sets the write access protection for the peripheral selected by WRCTRL.PERID. Write accesses are not allowed for the registers with the write protection property in this peripheral.

The “set and lock protection” operation sets the write access protection for the peripheral selected by WRCTRL.PERID and locks the access rights of the selected peripheral registers. The write access protection can be cleared only by a hardware reset.

The peripheral access control status can be read from the corresponding Peripheral Write Protection Status (STATUSn) register.