This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to place FreeRTOS in secure memory and the user tasks in non-secure memory?

I am porting FreeRTOS with TrustZone on LPC5500, I put FreeRTOS in secure memory, and created several user tasks in non-secure memory, as shown below:

But so far, I have not successfully switched from a secure task to a non-secure task.

How to switch from a secure task to a non-secure task?

Parents
  • Non-secure tasks also need Secure stack allocation if you want to allow them to call Secure APIs. So when the Non-secure task is created, a Secure stack space (possibly based on the maximum stack usage of a Secure API).

    When doing context switch, you need need to switch both PSP_NS and PSP_S (and their stack limit registers).

Reply
  • Non-secure tasks also need Secure stack allocation if you want to allow them to call Secure APIs. So when the Non-secure task is created, a Secure stack space (possibly based on the maximum stack usage of a Secure API).

    When doing context switch, you need need to switch both PSP_NS and PSP_S (and their stack limit registers).

Children