RA Flexible Software Package Documentation  Release v5.2.0

 
Arm TrustZone Context RA Port (rm_tz_context)

RTOS Context Management for RA MCUs.

Overview

Add this module to a secure TrustZone project to allow the associated non-secure project to use an RTOS. It is used by an RTOS port for RA MCUs (for example, the FreeRTOS Port (rm_freertos_port), which is automatically added to RA projects when FreeRTOS is selected during project creation).

Note
The RTOS Context Management module does not provide any interfaces to the user. To use this module to port an RTOS, consult the Arm documentation at https://arm-software.github.io/CMSIS_5/Core/html/group__context__trustzone__functions.html for further information.

Configuration

Build Time Configurations for rm_tz_context

The following build time configurations are defined in fsp_cfg/rm_tz_context_cfg.h:

ConfigurationOptionsDefaultDescription
Process Stack SlotsValue must be a non-negative integer greater than 08 The maximum number of threads that can allocate a secure context. For applications using FreeRTOS, the Idle task requires 1 context as well.
Process Stack SizeValue must be a non-negative multiple of 8256 The maximum stack size of all non-secure callable functions.

Clock Configuration

This module does not use peripheral clocks.

Pin Configuration

This module does not use I/O pins.

Usage Notes

TrustZone Integration

When using an RTOS in a TrustZone project, Arm recommends keeping the RTOS in the non-secure project. Tasks may call non-secure callable functions if the task has allocated a secure context. To allocate a secure context, reference the documentation for the RTOS port used. For example, reference TrustZone Integration when FreeRTOS is used.

Sealing the Process Stack

This module seals each process stack by placing the value 0xFEF5EDA5 above the stack top. For more information, refer to section 3.5 "Sealing a Stack" in "Secure software guidelines for ARMv8-M": https://developer.arm.com/documentation/100720/0300.