15.5.1.4 Write Access Protection Management Errors

Only word-wise (or register-wise) writes to the WRCTRL register will change the access protection. Other types of accesses will have no effect and will cause a PAC write access error. This error is reported in the INTFLAGA.PAC bit.

The PAC also generates an interrupt on double write clear or double write set operations.

  • If a peripheral is write protected and a subsequent set protection or set and lock operation is detected then the PAC returns an error.
  • If a peripheral is not protected and a subsequent clear protection operation is detected then the PAC returns an error.
  • If a peripheral is write protected and locked and either a clear protection or set protection operation is detected, then the PAC returns an error.

This can be used to ensure that the application follows any write protect with an unprotect and any unprotect with a protect. In applications where the write protect state of a peripheral is manipulated in several contexts, care must be taken so that the contexts do not interfere with each other.

The errors generated while accessing the PAC module registers (for example, key error, double protect error) will set the INTFLAGA.PAC flag.