TrustZone#

APIs to use RAIL with TrustZone enabled and peripherals configured as secure.

RAIL internally accesses CMU, EMU, GPIO, LDMA, HFXO, PRS and SYSRTC. If some of them are configured as secure peripherals, some RAIL code must be executed as secure code. To do so, callbacks gathered in RAIL_TZ_Config_t must be implemented and passed to RAIL through RAIL_TZ_InitNonSecure(). Each callback must do the non-secure/secure transition, call RAIL_TZ_CheckPeripheralsSecureStates() and then call the corresponding RAIL API from secure world:

Secure peripheral

Callbacks to implement

CMU

RAIL_TZ_Config_t::changedDcdcCallback, RAIL_TZ_Config_t::configAntennaGpioCallback, RAIL_TZ_Config_t::radioClockEnableCallback, RAIL_TZ_Config_t::getRadioClockFreqHzCallback, RAIL_TZ_Config_t::rfecaClockEnableCallback, RAIL_TZ_Config_t::rfecaIsClockEnabledCallback

EMU

RAIL_TZ_Config_t::readInternalTemperatureCallback, RAIL_TZ_Config_t::enableSecureRadioIrqsCallback, RAIL_TZ_Config_t::disableSecureRadioIrqsCallback

GPIO

RAIL_TZ_Config_t::configAntennaGpioCallback

LDMA

RAIL_TZ_Config_t::radioPerformM2mLdmaCallback

HFXO

RAIL_TZ_Config_t::configureHfxoCallback

RAIL internally calls platform functions that access CMU, EMU, GPIO, LDMA HFXO and PRS. If some of them are configured as secure peripherals, some functions must be executed as secure code. To do so, those functions are prepended with weak symbols and must be overwritten to do the non-secure/secure transition and call the corresponding platform function from secure world:

Secure peripheral

Platform functions to overwrite

CMU

CMU_ClockEnable, EMU_DCDCSetPFMXTimeoutMaxCtrl (DCDC access: SL_TRUSTZONE_PERIPHERAL_DCDC_S)

HFXO

CMU_HFXOCTuneSet, CMU_HFXOCTuneGet, CMU_HFXOCoreBiasCurrentCalibrate

PRS

PRS_SourceAsyncSignalSet, PRS_GetFreeChannel, PRS_ConnectConsumer, PRS_PinOutput, PRS_Combine

When there is a combination of secure and non-secure peripherals, defines must be added in secure application slcp file so non-secure peripherals can properly accessed by secure code. Example with only CMU non-secure:

define:
  - name: SL_TRUSTZONE_PERIPHERAL_CMU_S
    value: 0
    condition: [trustzone_secure]
  - name: SL_TRUSTZONE_PERIPHERAL_EMU_S
    value: 1
    condition: [trustzone_secure]
  - name: SL_TRUSTZONE_PERIPHERAL_GPIO_S
    value: 1
    condition: [trustzone_secure]
  - name: SL_TRUSTZONE_PERIPHERAL_LDMA_S
    value: 1
    condition: [trustzone_secure]
  - name: SL_TRUSTZONE_PERIPHERAL_HFXO0_S
    value: 1
    condition: [trustzone_secure]
  - name: SL_TRUSTZONE_PERIPHERAL_PRS_S
    value: 1
    condition: [trustzone_secure]
  - name: SL_TRUSTZONE_PERIPHERAL_SYSRTC_S
    value: 1
    condition: [trustzone_secure]

Some RAIL API are not suppoted with EMU, GPIO, LDMA, HFXO, PRS or SYSRTC configured secure:

Secure peripheral

Unsupported RAIL API/features

EMU

RAIL_StartThermistorMeasurement(), RAIL_InitPowerManager()

GPIO

RAIL_EnableDirectMode(), RAIL_EnableDirectModeAlt(), RAIL_EnablePti(), RAIL_ConfigPti(), RAIL_ConfigHFXOThermistor(), RAIL_StartThermistorMeasurement(), RAIL_ConfigVdet(), RAIL_BLE_ConfigAoxAntenna()

LDMA

RAIL_IEEE802154_SUPPORTS_RX_CHANNEL_SWITCHING (RAIL_IEEE802154_ConfigRxChannelSwitching() and RAIL_RX_OPTION_CHANNEL_SWITCHING)

HFXO

RAIL_StartThermistorMeasurement(), RAIL_EnableVdet(), RAIL_GetVdet()

PRS

RAIL_EnablePrsLnaBypass()

SYSRTC

RAIL_ConfigSleep() with RAIL_SleepConfig_t::RAIL_SLEEP_CONFIG_TIMERSYNC_ENABLED, RAIL_ConfigSleepAlt() with RAIL_SleepConfig_t::RAIL_SLEEP_CONFIG_TIMERSYNC_ENABLED

RAIL internally accesses CMU, EMU, GPIO, LDMA, HFXO, PRS and SYSRTC. If some of them are configured as secure peripherals, some RAIL code must be executed as secure code. To do so, callbacks gathered in sl_rail_tz_config_t must be implemented and passed to RAIL through sl_rail_tz_init_non_secure(). Each callback must do the non-secure/secure transition, call sl_rail_tz_check_peripherals_secure_states() and then call the corresponding RAIL API from secure world:

Secure peripheral

Callbacks to implement

CMU

sl_rail_tz_config_t::changed_dcdc_callback, sl_rail_tz_config_t::config_antenna_gpio_callback, sl_rail_tz_config_t::radio_clock_enable_callback, sl_rail_tz_config_t::get_radio_clock_freq_hz_callback, sl_rail_tz_config_t::rfeca_clock_enable_callback, sl_rail_tz_config_t::rfeca_is_clock_enabled_callback

EMU

sl_rail_tz_config_t::read_internal_temperature_callback, sl_rail_tz_config_t::enable_secure_radio_irqs_callback, sl_rail_tz_config_t::disable_secure_radio_irqs_callback

GPIO

sl_rail_tz_config_t::config_antenna_gpio_callback

HFXO

sl_rail_tz_config_t::configure_hfxo_callback

RAIL internally calls platform functions that access CMU, EMU, GPIO, LDMA HFXO and PRS. If some of them are configured as secure peripherals, some functions must be executed as secure code. To do so, those functions are prepended with weak symbols and must be overwritten to do the non-secure/secure transition and call the corresponding platform function from secure world:

Secure peripheral

Platform functions to overwrite

CMU

CMU_ClockEnable, EMU_DCDCSetPFMXTimeoutMaxCtrl (DCDC access: SL_TRUSTZONE_PERIPHERAL_DCDC_S)

HFXO

CMU_HFXOCTuneSet, CMU_HFXOCTuneGet, CMU_HFXOCoreBiasCurrentCalibrate

PRS

PRS_SourceAsyncSignalSet, PRS_GetFreeChannel, PRS_ConnectConsumer, PRS_PinOutput, PRS_Combine

When there is a combination of secure and non-secure peripherals, defines must be added in secure application slcp file so non-secure peripherals can properly accessed by secure code. Example with only CMU non-secure:

define:
  - name: SL_TRUSTZONE_PERIPHERAL_CMU_S
    value: 0
    condition: [trustzone_secure]
  - name: SL_TRUSTZONE_PERIPHERAL_EMU_S
    value: 1
    condition: [trustzone_secure]
  - name: SL_TRUSTZONE_PERIPHERAL_GPIO_S
    value: 1
    condition: [trustzone_secure]
  - name: SL_TRUSTZONE_PERIPHERAL_LDMA_S
    value: 1
    condition: [trustzone_secure]
  - name: SL_TRUSTZONE_PERIPHERAL_HFXO0_S
    value: 1
    condition: [trustzone_secure]
  - name: SL_TRUSTZONE_PERIPHERAL_PRS_S
    value: 1
    condition: [trustzone_secure]
  - name: SL_TRUSTZONE_PERIPHERAL_SYSRTC_S
    value: 1
    condition: [trustzone_secure]

Some RAIL API are not suppoted with EMU, GPIO LDMA, HFXO, PRS or SYSRTC configured secure:

Secure peripheral

Unsupported RAIL API/features

EMU

sl_rail_start_thermistor_measurement(), sl_rail_init_power_manager()

GPIO

sl_rail_enable_direct_mode(), sl_rail_enable_pti(), sl_rail_config_pti(), sl_rail_config_hfxo_thermistor(), sl_rail_start_thermistor_measurement(), sl_rail_config_vdet(), sl_rail_ble_config_aox_antenna()

LDMA

SL_RAIL_IEEE802154_SUPPORTS_RX_CHANNEL_SWITCHING (sl_rail_ieee802154_config_rx_channel_switching() and SL_RAIL_RX_OPTION_CHANNEL_SWITCHING)

HFXO

sl_rail_start_thermistor_measurement(), sl_rail_enable_vdet(), sl_rail_get_vdet()

PRS

sl_rail_enable_prs_lna_bypass()

SYSRTC

sl_rail_config_sleep() with sl_rail_sleep_config_t::SL_RAIL_SLEEP_CONFIG_TIMERSYNC_ENABLED

Modules#

RAIL_TZ_Config_t

sl_rail_tz_config_t

Typedefs#

typedef RAIL_Status_t(*

A pointer to the callback used to switch to secure world and run RAIL_ChangedDcdc().

typedef RAIL_Status_t(*
RAIL_TZ_ConfigAntennaGpioCallbackPtr_t)(const RAIL_AntennaConfig_t *config)

A pointer to the callback used to switch to secure world and run RAIL_TZ_ConfigAntennaGpio().

typedef void(*

A pointer to the callback used to switch to secure world and run RAIL_TZ_RadioClockEnable().

typedef uint32_t(*

A pointer to the callback used to switch to secure world and run RAIL_GetRadioClockFreqHz().

typedef void(*

A pointer to the callback used to switch to secure world and run RAIL_TZ_RfecaClockEnable().

typedef bool(*

A pointer to the callback used to switch to secure world and run RAIL_TZ_RfecaIsClockEnabled().

typedef RAIL_Status_t(*
RAIL_TZ_ReadInternalTemperatureCallbackPtr_t)(uint16_t *internalTemperatureKelvin, bool enableTemperatureInterrupts)

A pointer to the callback used to switch to secure world and run RAIL_TZ_ReadInternalTemperature().

typedef void(*

A pointer to the callback used to switch to secure world and run RAIL_TZ_EnableSecureRadioIrqs().

typedef void(*

A pointer to the callback used to switch to secure world and run RAIL_TZ_DisableSecureRadioIrqs().

typedef RAIL_Status_t(*
RAIL_TZ_RadioPerformM2mLdmaCallbackPtr_t)(uint32_t *pDest, const uint32_t *pSrc, uint32_t numWords)

A pointer to the callback used to switch to secure world and run RAIL_TZ_RadioPerformM2mLdma().

typedef RAIL_Status_t(*

A pointer to the callback used to switch to secure world and run RAIL_TZ_ConfigureHfxo().

A pointer to the callback used to switch to secure world and run sl_rail_changed_dcdc().

sl_rail_tz_config_antenna_gpio_callback_t)(const sl_rail_antenna_config_t *p_config)

A pointer to the callback used to switch to secure world and run sl_rail_tz_config_antenna_gpio().

typedef void(*

A pointer to the callback used to switch to secure world and run sl_rail_tz_radio_clock_enable().

typedef uint32_t(*

A pointer to the callback used to switch to secure world and run sl_rail_get_radio_clock_freq_hz().

typedef void(*

A pointer to the callback used to switch to secure world and run sl_rail_tz_rfeca_clock_enable().

typedef bool(*

A pointer to the callback used to switch to secure world and run sl_rail_tz_rfeca_is_clock_enabled().

sl_rail_tz_read_internal_temperature_callback_t)(uint16_t *p_internal_temperature_kelvin, bool enable_temperature_interrupts)

A pointer to the callback used to switch to secure world and run sl_rail_tz_read_internal_temperature().

typedef void(*

A pointer to the callback used to switch to secure world and run sl_rail_tz_enable_secure_radio_irqs().

typedef void(*

A pointer to the callback used to switch to secure world and run sl_rail_tz_disable_secure_radio_irqs().

sl_rail_tz_radio_perform_m2m_ldma_callback_t)(uint32_t *p_dest, const uint32_t *p_src, uint32_t num_words)

A pointer to the callback used to switch to secure world and run sl_rail_tz_radio_perform_m2m_ldma().

A pointer to the callback used to switch to secure world and run sl_rail_tz_configure_hfxo().

Functions#

RAIL_TZ_InitNonSecure(const RAIL_TZ_Config_t *pTzConfig)

Init RAIL TrustZone feature for non-secure world.

Init RAIL TrustZone feature for secure world.

Check the secure state of peripherals used by RAIL.

Enable radio clocks.

Enable RFECA clocks.

bool

Indicate whether RFECA clocks are enabled.

RAIL_TZ_ReadInternalTemperature(uint16_t *internalTemperatureKelvin, bool enableTemperatureInterrupts)

Read the internal temperature.

Enable secure peripheral interrupts needed by the radio.

Disable secure peripheral interrupts needed by the radio.

RAIL_TZ_RadioPerformM2mLdma(uint32_t *pDest, const uint32_t *pSrc, uint32_t numWords)

Perform ldma transfer for the radio.

RAIL_TZ_ConfigAntennaGpio(const RAIL_AntennaConfig_t *config)

Set GPIO for antenna config.

sl_rail_tz_init_non_secure(const sl_rail_tz_config_t *p_tz_config)

Init RAIL TrustZone feature for non-secure world.

Init RAIL TrustZone feature for secure world.

Check the secure state of peripherals used by RAIL.

bool

Indicate whether RFECA clocks are enabled.

sl_rail_tz_read_internal_temperature(uint16_t *p_internal_temperature_kelvin, bool enable_temperature_interrupts)

Read the internal temperature.

Enable secure peripheral interrupts needed by the radio.

Disable secure peripheral interrupts needed by the radio.

sl_rail_tz_radio_perform_m2m_ldma(uint32_t *p_dest, const uint32_t *p_src, uint32_t num_words)

Perform ldma transfer for the radio.

sl_rail_tz_config_antenna_gpio(const sl_rail_antenna_config_t *p_config)

Set GPIO for antenna config.

Typedef Documentation#

RAIL_TZ_ChangedDcdcCallbackPtr_t#

RAIL_TZ_ChangedDcdcCallbackPtr_t )(void)

A pointer to the callback used to switch to secure world and run RAIL_ChangedDcdc().

Returns

  • Status code indicating success of the function call.

DeprecatedRAIL 2.x synonym of sl_rail_tz_changed_dcdc_callback_t().


RAIL_TZ_ConfigAntennaGpioCallbackPtr_t#

RAIL_TZ_ConfigAntennaGpioCallbackPtr_t )(const RAIL_AntennaConfig_t *config)

A pointer to the callback used to switch to secure world and run RAIL_TZ_ConfigAntennaGpio().

Parameters
TypeDirectionArgument NameDescription
[in]config

A pointer to a configuration structure applied to the relevant Antenna Configuration registers. A NULL configuration will produce undefined behavior.

Returns

  • Status code indicating success of the function call.

DeprecatedRAIL 2.x synonym of sl_rail_tz_config_antenna_gpio_callback_t().


RAIL_TZ_RadioClockEnableCallbackPtr_t#

RAIL_TZ_RadioClockEnableCallbackPtr_t )(void)

A pointer to the callback used to switch to secure world and run RAIL_TZ_RadioClockEnable().

DeprecatedRAIL 2.x synonym of sl_rail_tz_radio_clock_enable_callback_t().


RAIL_TZ_GetRadioClockFreqHzCallbackPtr_t#

RAIL_TZ_GetRadioClockFreqHzCallbackPtr_t )(void)

A pointer to the callback used to switch to secure world and run RAIL_GetRadioClockFreqHz().

Returns

  • Radio subsystem clock frequency in Hz.

DeprecatedRAIL 2.x synonym of sl_rail_tz_get_radio_clock_freq_hz_callback_t().


RAIL_TZ_RfecaClockEnableCallbackPtr_t#

RAIL_TZ_RfecaClockEnableCallbackPtr_t )(void)

A pointer to the callback used to switch to secure world and run RAIL_TZ_RfecaClockEnable().

DeprecatedRAIL 2.x synonym of sl_rail_tz_rfeca_clock_enable_callback_t().


RAIL_TZ_RfecaIsClockEnabledCallbackPtr_t#

RAIL_TZ_RfecaIsClockEnabledCallbackPtr_t )(void)

A pointer to the callback used to switch to secure world and run RAIL_TZ_RfecaIsClockEnabled().

Returns

  • true if RFECA clocks are enabled; false otherwise

DeprecatedRAIL 2.x synonym of sl_rail_tz_rfeca_is_clock_enabled_callback_t().


RAIL_TZ_ReadInternalTemperatureCallbackPtr_t#

RAIL_TZ_ReadInternalTemperatureCallbackPtr_t )(uint16_t *internalTemperatureKelvin, bool enableTemperatureInterrupts)

A pointer to the callback used to switch to secure world and run RAIL_TZ_ReadInternalTemperature().

Parameters
TypeDirectionArgument NameDescription
[out]internalTemperatureKelvin

A pointer to the internal temperature in Kelvin.

[in]enableTemperatureInterrupts

Indicate whether temperature interrupts are enabled.

Returns

  • Status code indicating success of the function call.

DeprecatedRAIL 2.x synonym of sl_rail_tz_read_internal_temperature_callback_t().


RAIL_TZ_EnableSecureRadioIrqsCallbackPtr_t#

RAIL_TZ_EnableSecureRadioIrqsCallbackPtr_t )(void)

A pointer to the callback used to switch to secure world and run RAIL_TZ_EnableSecureRadioIrqs().

DeprecatedRAIL 2.x synonym of sl_rail_tz_enable_secure_radio_irqs_callback_t().


RAIL_TZ_DisableSecureRadioIrqsCallbackPtr_t#

RAIL_TZ_DisableSecureRadioIrqsCallbackPtr_t )(void)

A pointer to the callback used to switch to secure world and run RAIL_TZ_DisableSecureRadioIrqs().

DeprecatedRAIL 2.x synonym of sl_rail_tz_disable_secure_radio_irqs_callback_t().


RAIL_TZ_RadioPerformM2mLdmaCallbackPtr_t#

RAIL_TZ_RadioPerformM2mLdmaCallbackPtr_t )(uint32_t *pDest, const uint32_t *pSrc, uint32_t numWords)

A pointer to the callback used to switch to secure world and run RAIL_TZ_RadioPerformM2mLdma().

Parameters
TypeDirectionArgument NameDescription
[in]pDest

A pointer to the destination data.

[in]pSrc

A pointer to the source data.

[in]numWords

Number of words to transfer.

Returns

  • Status code indicating success of the function call.

DeprecatedRAIL 2.x synonym of sl_rail_tz_radio_perform_m2m_ldma_callback_t().


RAIL_TZ_ConfigureHfxoCallbackPtr_t#

RAIL_TZ_ConfigureHfxoCallbackPtr_t )(void)

A pointer to the callback used to switch to secure world and run RAIL_TZ_ConfigureHfxo().

DeprecatedRAIL 2.x synonym of sl_rail_tz_configure_hfxo_callback_t().


sl_rail_tz_changed_dcdc_callback_t#

sl_rail_tz_changed_dcdc_callback_t )(void)

A pointer to the callback used to switch to secure world and run sl_rail_changed_dcdc().

Returns

  • Status code indicating success of the function call.


sl_rail_tz_config_antenna_gpio_callback_t#

sl_rail_tz_config_antenna_gpio_callback_t )(const sl_rail_antenna_config_t *p_config)

A pointer to the callback used to switch to secure world and run sl_rail_tz_config_antenna_gpio().

Parameters
TypeDirectionArgument NameDescription
[in]p_config

A pointer to a configuration structure applied to the relevant Antenna Configuration registers. A NULL configuration will produce undefined behavior.

Returns

  • Status code indicating success of the function call.


sl_rail_tz_radio_clock_enable_callback_t#

sl_rail_tz_radio_clock_enable_callback_t )(void)

A pointer to the callback used to switch to secure world and run sl_rail_tz_radio_clock_enable().


sl_rail_tz_get_radio_clock_freq_hz_callback_t#

sl_rail_tz_get_radio_clock_freq_hz_callback_t )(void)

A pointer to the callback used to switch to secure world and run sl_rail_get_radio_clock_freq_hz().

Returns

  • Radio subsystem clock frequency in Hz.


sl_rail_tz_rfeca_clock_enable_callback_t#

sl_rail_tz_rfeca_clock_enable_callback_t )(void)

A pointer to the callback used to switch to secure world and run sl_rail_tz_rfeca_clock_enable().


sl_rail_tz_rfeca_is_clock_enabled_callback_t#

sl_rail_tz_rfeca_is_clock_enabled_callback_t )(void)

A pointer to the callback used to switch to secure world and run sl_rail_tz_rfeca_is_clock_enabled().

Returns

  • true if RFECA clocks are enabled; false otherwise


sl_rail_tz_read_internal_temperature_callback_t#

sl_rail_tz_read_internal_temperature_callback_t )(uint16_t *p_internal_temperature_kelvin, bool enable_temperature_interrupts)

A pointer to the callback used to switch to secure world and run sl_rail_tz_read_internal_temperature().

Parameters
TypeDirectionArgument NameDescription
[out]p_internal_temperature_kelvin

A pointer to the internal temperature in Kelvin.

[in]enable_temperature_interrupts

Indicate whether temperature interrupts are enabled.

Returns

  • Status code indicating success of the function call.


sl_rail_tz_enable_secure_radio_irqs_callback_t#

sl_rail_tz_enable_secure_radio_irqs_callback_t )(void)

A pointer to the callback used to switch to secure world and run sl_rail_tz_enable_secure_radio_irqs().


sl_rail_tz_disable_secure_radio_irqs_callback_t#

sl_rail_tz_disable_secure_radio_irqs_callback_t )(void)

A pointer to the callback used to switch to secure world and run sl_rail_tz_disable_secure_radio_irqs().


sl_rail_tz_radio_perform_m2m_ldma_callback_t#

sl_rail_tz_radio_perform_m2m_ldma_callback_t )(uint32_t *p_dest, const uint32_t *p_src, uint32_t num_words)

A pointer to the callback used to switch to secure world and run sl_rail_tz_radio_perform_m2m_ldma().

Parameters
TypeDirectionArgument NameDescription
[in]p_dest

A pointer to the destination data.

[in]p_src

A pointer to the source data.

[in]num_words

Number of words to transfer.

Returns

  • Status code indicating success of the function call.


sl_rail_tz_configure_hfxo_callback_t#

sl_rail_tz_configure_hfxo_callback_t )(void)

A pointer to the callback used to switch to secure world and run sl_rail_tz_configure_hfxo().


Function Documentation#

RAIL_TZ_InitNonSecure#

RAIL_Status_t RAIL_TZ_InitNonSecure (const RAIL_TZ_Config_t * pTzConfig)

Init RAIL TrustZone feature for non-secure world.

Parameters
TypeDirectionArgument NameDescription
const RAIL_TZ_Config_t *[in]pTzConfig

A non-NULL pointer to a RAIL_TZ_Config_t structure.

Returns

  • Status code indicating success of the function call.

Note

DeprecatedRAIL 2.x synonym of sl_rail_tz_init_non_secure().


RAIL_TZ_InitSecure#

RAIL_Status_t RAIL_TZ_InitSecure (void )

Init RAIL TrustZone feature for secure world.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world (only if TrustZone is activated) on platforms having RAIL_SUPPORTS_TRUSTZONE_SECURE_PERIPHERALS. It must be called before starting the non-secure application.

DeprecatedRAIL 2.x synonym of sl_rail_tz_init_secure().


RAIL_TZ_CheckPeripheralsSecureStates#

RAIL_Status_t RAIL_TZ_CheckPeripheralsSecureStates (void )

Check the secure state of peripherals used by RAIL.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world and it must be called at the beginning of each RAIL TrustZone callbacks (RAIL_TZ_Config_t) secure code to avoid secure fault.

DeprecatedRAIL 2.x synonym of sl_rail_tz_check_peripherals_secure_states().


RAIL_TZ_RadioClockEnable#

RAIL_Status_t RAIL_TZ_RadioClockEnable (void )

Enable radio clocks.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when CMU is configured as secure TrustZone peripheral.

DeprecatedRAIL 2.x synonym of sl_rail_tz_radio_clock_enable().


RAIL_TZ_RfecaClockEnable#

RAIL_Status_t RAIL_TZ_RfecaClockEnable (void )

Enable RFECA clocks.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when CMU is configured as secure TrustZone peripheral.

DeprecatedRAIL 2.x synonym of sl_rail_tz_rfeca_clock_enable().


RAIL_TZ_RfecaIsClockEnabled#

bool RAIL_TZ_RfecaIsClockEnabled (void )

Indicate whether RFECA clocks are enabled.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • true if RFECA clocks are enabled; false otherwise

Note

  • This function must only be called from secure world when CMU is configured as secure TrustZone peripheral.

DeprecatedRAIL 2.x synonym of sl_rail_tz_rfeca_is_clock_enabled().


RAIL_TZ_ReadInternalTemperature#

RAIL_Status_t RAIL_TZ_ReadInternalTemperature (uint16_t * internalTemperatureKelvin, bool enableTemperatureInterrupts)

Read the internal temperature.

Parameters
TypeDirectionArgument NameDescription
uint16_t *[out]internalTemperatureKelvin

A pointer to the internal temperature in Kelvin.

bool[in]enableTemperatureInterrupts

Indicate whether temperature interrupts are enabled.

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when EMU is configured as secure TrustZone peripheral.

DeprecatedRAIL 2.x synonym of sl_rail_tz_read_internal_temperature().


RAIL_TZ_EnableSecureRadioIrqs#

RAIL_Status_t RAIL_TZ_EnableSecureRadioIrqs (void )

Enable secure peripheral interrupts needed by the radio.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when EMU is configured as secure TrustZone peripheral.

DeprecatedRAIL 2.x synonym of sl_rail_tz_enable_secure_radio_irqs().


RAIL_TZ_DisableSecureRadioIrqs#

RAIL_Status_t RAIL_TZ_DisableSecureRadioIrqs (void )

Disable secure peripheral interrupts needed by the radio.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when EMU is configured as secure TrustZone peripheral.

DeprecatedRAIL 2.x synonym of sl_rail_tz_disable_secure_radio_irqs().


RAIL_TZ_RadioPerformM2mLdma#

RAIL_Status_t RAIL_TZ_RadioPerformM2mLdma (uint32_t * pDest, const uint32_t * pSrc, uint32_t numWords)

Perform ldma transfer for the radio.

Parameters
TypeDirectionArgument NameDescription
uint32_t *[in]pDest

A pointer to the destination data.

const uint32_t *[in]pSrc

A pointer to the source data.

uint32_t[in]numWords

Number of words to transfer.

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when LDMA is configured as secure TrustZone peripheral.

DeprecatedRAIL 2.x synonym of sl_rail_tz_radio_perform_m2m_ldma().


RAIL_TZ_ConfigureHfxo#

RAIL_Status_t RAIL_TZ_ConfigureHfxo (void )

Configure HFXO.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when HFXO is configured as secure TrustZone peripheral.

DeprecatedRAIL 2.x synonym of sl_rail_tz_configure_hfxo().


RAIL_TZ_ConfigAntennaGpio#

RAIL_Status_t RAIL_TZ_ConfigAntennaGpio (const RAIL_AntennaConfig_t * config)

Set GPIO for antenna config.

Parameters
TypeDirectionArgument NameDescription
const RAIL_AntennaConfig_t *[in]config

A pointer to a configuration structure applied to the relevant Antenna Configuration registers. A NULL configuration will produce undefined behavior.

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when CMU or GPIO are configured as secure TrustZone peripheral.

DeprecatedRAIL 2.x synonym of sl_rail_tz_config_antenna_gpio().


sl_rail_tz_init_non_secure#

sl_rail_status_t sl_rail_tz_init_non_secure (const sl_rail_tz_config_t * p_tz_config)

Init RAIL TrustZone feature for non-secure world.

Parameters
TypeDirectionArgument NameDescription
const sl_rail_tz_config_t *[in]p_tz_config

A non-NULL pointer to a sl_rail_tz_config_t structure.

Returns

  • Status code indicating success of the function call.

Note


sl_rail_tz_init_secure#

sl_rail_status_t sl_rail_tz_init_secure (void )

Init RAIL TrustZone feature for secure world.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status code indicating success of the function call.

Note


sl_rail_tz_check_peripherals_secure_states#

sl_rail_status_t sl_rail_tz_check_peripherals_secure_states (void )

Check the secure state of peripherals used by RAIL.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world and it must be called at the beginning of each RAIL TrustZone callbacks (sl_rail_tz_config_t) secure code to avoid secure fault.


sl_rail_tz_radio_clock_enable#

sl_rail_status_t sl_rail_tz_radio_clock_enable (void )

Enable radio clocks.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when CMU is configured as secure TrustZone peripheral.


sl_rail_tz_rfeca_clock_enable#

sl_rail_status_t sl_rail_tz_rfeca_clock_enable (void )

Enable RFECA clocks.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when CMU is configured as secure TrustZone peripheral.


sl_rail_tz_rfeca_is_clock_enabled#

bool sl_rail_tz_rfeca_is_clock_enabled (void )

Indicate whether RFECA clocks are enabled.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • true if RFECA clocks are enabled; false otherwise

Note

  • This function must only be called from secure world when CMU is configured as secure TrustZone peripheral.


sl_rail_tz_read_internal_temperature#

sl_rail_status_t sl_rail_tz_read_internal_temperature (uint16_t * p_internal_temperature_kelvin, bool enable_temperature_interrupts)

Read the internal temperature.

Parameters
TypeDirectionArgument NameDescription
uint16_t *[out]p_internal_temperature_kelvin

A pointer to the internal temperature in Kelvin.

bool[in]enable_temperature_interrupts

Indicate whether temperature interrupts are enabled.

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when EMU is configured as secure TrustZone peripheral.


sl_rail_tz_enable_secure_radio_irqs#

sl_rail_status_t sl_rail_tz_enable_secure_radio_irqs (void )

Enable secure peripheral interrupts needed by the radio.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when EMU is configured as secure TrustZone peripheral.


sl_rail_tz_disable_secure_radio_irqs#

sl_rail_status_t sl_rail_tz_disable_secure_radio_irqs (void )

Disable secure peripheral interrupts needed by the radio.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when EMU is configured as secure TrustZone peripheral.


sl_rail_tz_radio_perform_m2m_ldma#

sl_rail_status_t sl_rail_tz_radio_perform_m2m_ldma (uint32_t * p_dest, const uint32_t * p_src, uint32_t num_words)

Perform ldma transfer for the radio.

Parameters
TypeDirectionArgument NameDescription
uint32_t *[in]p_dest

A pointer to the destination data.

const uint32_t *[in]p_src

A pointer to the source data.

uint32_t[in]num_words

Number of words to transfer.

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when LDMA is configured as secure TrustZone peripheral.


sl_rail_tz_configure_hfxo#

sl_rail_status_t sl_rail_tz_configure_hfxo (void )

Configure HFXO.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when HFXO is configured as secure TrustZone peripheral.


sl_rail_tz_config_antenna_gpio#

sl_rail_status_t sl_rail_tz_config_antenna_gpio (const sl_rail_antenna_config_t * p_config)

Set GPIO for antenna config.

Parameters
TypeDirectionArgument NameDescription
const sl_rail_antenna_config_t *[in]p_config

A pointer to a configuration structure applied to the relevant Antenna Configuration registers. A NULL configuration will produce undefined behavior.

Returns

  • Status code indicating success of the function call.

Note

  • This function must only be called from secure world when CMU or GPIO are configured as secure TrustZone peripherals.