LPC55S69 TrustZone

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC55S69 TrustZone

858 Views
kentseng
Contributor II

Hi All :

I’m trying to use the non-Secure SysTick Timer in Non-Secure project of trustzone example “Hello World” from SDK_2.9.0_LPCXpresso55s69 (MCUXpresso IDE project) with my LPCXpresso55s69 board. 

The System Tick Configuration (non-secure) “TZ_SysTick_Config_NS” runs successfully in non-secure world. (hello_world_ns.c ) 

After trustzone example “Hello World” runs completely, nothing happened to the Handler function “SysTick_Handler” which added in non-sercure world. (hello_world_ns.c )   

The same result presented if I try to copy and add another vector table initialization e.g., “g_pfnVectors_ns” in starup code for secure & non-secure project (~\lpcxpresso55s69_hello_world_s\startup\startup_lpc55s69_cm33_core0.c  & ~\lpcxpresso55s69_hello_world_ns\startup\startup_lpc55s69_cm33_core0.c ) 

The Non-secure vector base address specify to start address of non-secure world in secure project. ( hello_world_s.c ) 

    /* Set non-secure vector table */ 

    SCB_NS->VTOR = NON_SECURE_START; 

 

As we know, there are three system tick timers (SysTick timer) are present in the LPC55S69. Two inside the CPU0 (Secured and Non-Secured), and one inside the CPU1 (Non-Secured). 

How can I use non-Secure SysTick Timer for my non-Secure application in non-Secure world? 

Ref : 

  1. “The vector base address is banked between Secure and Non-secure state. VTOR_S contains the Secure vector base address, and VTOR_NS contains the Non-secure vector base address. These registers can be programmed by software, and also initialized at reset by the system” ( https://developer.arm.com/documentation/100230/0002/functional-description/programmers-model/excepti...
  2. “two system tick timers in CPU0 in lpc55s69” https://community.nxp.com/t5/LPC-Microcontrollers/two-system-tick-timers-in-CPU0-in-lpc55s69/m-p/100...
  3. “The system supports two separate interrupt vector tables for secure and non-secure code execution. This interrupt assignment is controlled during Secure state code execution via the NVIC (nested vector interrupt controller).” ( https://www.keil.com/pack/doc/CMSIS/Core/html/using_TrustZone_pg.html )
Labels (1)
0 Kudos
3 Replies

828 Views
kentseng
Contributor II

Dear Sir :

Thanks for your documentation for MRT0 module interrupt example in Non-secure world. ( GeneratingInterruptInNon-securityMode.pdf )
I’ll exercise it for Device specific interrupts with Positive IRQn values.

By the way, the SysTick Timer uses dedicated exception vector : processor core exceptions which with negative IRQn values. e.g., Exception 15: System Tick Interrupt. SysTick_IRQn = -1

After check the NVIC functions, nothing what I found to initial NVIC module if the processor core exceptions which with negative IRQn values.

Do you have any idea for processor core exceptions which with negative IRQn values in Non-secure world ?

Thanks!

kentseng_0-1620092937121.png

Ref : https://www.keil.com/pack/doc/CMSIS/Core/html/group__NVIC__gr.html

0 Kudos

817 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls refer to the following figure which defines the priority of SysTick module, I copy it from the Cortex-M4 user manual.

Hope it can help you

BR

XiangJun Rong

xiangjun_rong_0-1620270024242.png

 

0 Kudos

854 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, TZU,

I attach an simple documentation, pls refer to it.

BR

XiangJun Rong

0 Kudos