Secure and Non-Secure Peripherals Overview
Peripheral Access Controller (PAC) Features for SAM L11
The SAM L11 extends the concept of Arm® TrustZone® to its integrated peripherals and offers the possibility of allocating specific peripherals to both Secure and Non-Secure worlds. The management of each peripheral security attribution is done through the PAC. As shown in the figure below, the PAC embeds a set of registers that defines the security attribution of each integrated peripheral of the system.
Regardless of its bit value, the PAC is always Secure. The peripheral's security attribution cannot be changed by accessing the PAC.NONSECx registers during the application run-time. Any change must be made using the User Row (UROW) fuses and requires a reset of the SAM L11 device. The application can read the PAC.NONSECx register to get the current attribution setting of the integrated peripherals.
These registers are configured at device startup by the ROM code which sets the PAC.NONSECx registers according to the user configuration stored in the UROW fuses.
Peripherals can be categorized into two groups depending on their PAC security attribution and their internal secure partitioning capabilities (standard/mix-secure):
- Non-Secure peripheral - A standard peripheral configured as Non-Secure in the PAC. The security attribution of the whole peripheral is defined by the associated NONSECx fuse set to one. Secure and Non-Secure accesses to the peripheral are granted.
- Secure peripheral - A standard peripheral configured as Secure in the PAC. The security attribution of the whole peripheral is defined by the associated NONSECx fuse set to zero. Secure accesses to the peripheral are granted whereas Non-Secure accesses are discarded (writes are ignored, reads return 0x0), and a PAC error is triggered.
When a peripheral is allocated to the Secure world, only Secure accesses to its registers are granted. Note that the interrupt handling should be managed in the Secure world only.
For more details, refer to the SAM L11 UROW from the product datasheet.