CMSIS-Core (Cortex-M)
Version 5.5.0
CMSIS-Core support for Cortex-M processor-based devices
|
The TrustZone setup: partition_<device>.h header file contains the initial setup of the TrustZone hardware in an Armv8-M system.
This file implements the function TZ_SAU_Setup that is call from SystemInit. It uses settings in these files:
The partition_<device>.h file contains the following configuration settings for:
The partition_<device>.h file includes the partition_gen.h file with configuration settings for:
#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 |
---|---|---|---|
SCB_CSR_AIRCR_INIT | 0 .. 1 | 1 | Setup behaviour of Sleep and Exception Handling
|
CSR_INIT_DEEPSLEEPS_VAL | 0 .. 1 | 1 | value for SCB_CSR register bit DEEPSLEEPS
|
AIRCR_INIT_SYSRESETREQS_VAL | 0 .. 1 | 1 | value for SCB_AIRCR register bit SYSRESETREQS
|
AIRCR_INIT_PRIS_VAL | 0 .. 1 | 1 | value for SCB_AIRCR register bit PRIS
|
AIRCR_INIT_BFHFNMINS_VAL | 0 .. 1 | 0 | value for SCB_AIRCR register bit BFHFNMINS
|
#define | Value Range | Default | Description |
---|---|---|---|
TZ_FPU_NS_USAGE | 0 .. 1 | 1 | Setup behaviour of Floating Point Unit
|
SCB_NSACR_CP10_11_VAL | 0 or 3 | 3 | Floating Point Unit usage (Value for SCB->NSACR register bits CP10, CP11)
|
FPU_FPCCR_TS_VAL | 0 .. 1 | 0 | Treat floating-point registers as Secure (value for FPU->FPCCR register bit TS)
|
FPU_FPCCR_CLRONRETS_VAL | 0 .. 1 | 0 | Clear on return (CLRONRET) accessibility (Value for FPU->FPCCR register bit CLRONRETS)
|
FPU_FPCCR_CLRONRET_VAL | 0 .. 1 | 1 | Clear floating-point caller saved registers on exception return (Value for FPU->FPCCR register bit CLRONRET)
|
The partition_gen.h header file can be generated using CMSIS-Zone.
The partition_<device>.h file includes the partition_gen.h file with configuration settings for:
#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.
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.