3.26.9 Peripheral Access Controller (PAC) Driver

Overview

Legacy dsPIC/PIC devices used previously used the sequence 0xAA and 0x55 written to NVMKEY to prevent accidental changes to critical peripherals. The PAC module has replaced the legacy locking mechanism and provides dedicated and more advanced control over peripheral register access.

The PAC module implements logic involving a lock bit and a write enable bit for each peripheral. If the lock bit (LK) or the inverse of the write enable bit (WR) is set, registers cannot be written to and only read access is allowed. PAC can lock/unlock individual registers or entire ranges of registers