CMSIS-Core (Cortex-M)
Version 5.3.0
CMSIS-Core support for Cortex-M processor-based devices
|
The System Partition Header File partition_<device>.h contains the initial setup of the TrustZone hardware in an Armv8-M system. The function TZ_SAU_Setup is call from SystemInit and uses the settings in this file to initialize the Secure Attribute Unit (SAU) and define non-secure interrupts (register NVIC_INIT_ITNS). The following initializations are performed:
#define | Value Range | Default | Description |
---|---|---|---|
SAU_INIT_CTRL | 0 .. 1 | 0 | Initialize SAU CTRL register or not
|
SAU_INIT_CTRL_ENABLE | 0 .. 1 | 0 | enable/disable the SAU
|
SAU_INIT_CTRL_ALLNS | 0 .. 1 | 0 | value for SAU_CTRL register bit ALLNS
|
#define | Value Range | Default | Description |
---|---|---|---|
SAU_REGIONS_MAX | 0 .. tbd | 8 | maximum number of SAU regions |
SAU_INIT_REGION<number> | 0 .. 1 | 0 | initialize SAU region or not
|
SAU_INIT_START<number> | 0x00000000 .. 0xFFFFFFE0 [in steps of 32] | 0x00000000 | region start address |
SAU_INIT_END<number> | 0x00000000 .. 0xFFFFFFE0 [in steps of 32] | 0x00000000 | region start address |
SAU_INIT_NSC<number> | 0 .. 1 | 0 | SAU region attribute
|
The range of <number> is from 0 .. SAU_REGIONS_MAX. A set of these macros must exist for each <number>.
The following example shows a set of SAU region macros.
#define | Value Range | Default | Description |
---|---|---|---|
CSR_INIT_DEEPSLEEPS | 0 .. 1 | 0 | value for SCB_CSR register bit DEEPSLEEPS
|
AIRCR_INIT_SYSRESETREQS | 0 .. 1 | 0 | value for SCB_AIRCR register bit SYSRESETREQS
|
AIRCR_INIT_PRIS | 0 .. 1 | 0 | value for SCB_AIRCR register bit PRIS
|
AIRCR_INIT_BFHFNMINS | 0 .. 1 | 0 | value for SCB_AIRCR register bit BFHFNMINS
|
Each interrupt has a configuration bit that defines the execution in Secure or Non-secure state. The Non-Secure interrupts have a separate vector table. Refer to Programmers Model with TrustZone for more information.
#define | Value Range | Default | Description |
---|---|---|---|
NVIC_INIT_ITNS<number> | 0x00000000 .. 0xFFFFFFFF [each bit represents an interrupt] | 0x00000000 | Interrupt vector target
|
The range of <number> is 0 .. (<number of external interrupts> + 31) / 32.
The following example shows the configuration for a maximum of 64 external interrupts.