12.2.3 Memory and Peripheral Security Configurations
- The User Row (UROW)
- The Boot Configuration Row (BOCOR)
Peripheral | Peripheral Register(s) | Security Parameters | Security Configurations |
---|---|---|---|
IDAU | SECCTRL, SCFGB, SCFGA, SCFGR | AS, ANSC, DS, RS, RXN BNSC, BOOTPROT | Memories security configurations (Flash, Data Flash and SRAM) |
PAC | NONSECA, NONSECB, NONSECC SECLOCKA, SECLOCKB, SECLOCKC | One bit per Peripheral | Peripherals security configuration Peripherals security configuration lock |
DSU | STATUSB | DAL | Debug Access Level status |
NVMCTRL | SECCTRL, SCFGB, SCFGAD | DXN URWEN, BCREN, BCWEN | Memories security configurations (Data Flash) NVM Configuration rows R/W capability |
SECCTRL | DALUN | Debug Access Level capability |
It is also possible, depending on the SECCFGLOCK NVM bit from BOCOR row, to allow the modifications of the security configurations during the application execution by programming the different IDAU, PAC, and NVMCTRL peripheral registers. This brings an added-value in term of security privileges to the secure software code running out of the Flash Boot region compared to the one running out of the Flash APPLICATION region as it is possible to exit the Boot ROM without locking the security configuration bits.
Therefore, the secure software code of the Flash Boot region will have the responsibility to lock the security configuration before passing control on to the secure software code of the Flash application region.
.
- If SECCFGLOCK = 1:
- The security configurations are locked, hence no code (even secure) can change them before next reset sequence.
- The only way to update the security configurations is to reprogram the NVM Configuration rows then reset the device.
- If SECCFGLOCK = 0:
- The security configurations can be modified during the application execution.
- It remains also possible to update the security configurations by reprogramming the NVM Configuration rows then resetting the device.
- IDAU.SECCTRL.SCFGWEN = 0
- NVMCTRL.SECCTRL.SCFGWEN = 0
- PAC.WRCTRL = SECLOCK command for each peripheral (excluding IDAU/DSU which are always locked)
- NVMCTRL.SECCTRL.DALUN = 1 which restores DAL configuration