How to create tasks in secure reason on Truszone based MCU STM32U5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-28 9:02 PM
Hello Support Team,
Good day,
We have chosen the STM32U585ZIT6Q (-40C to 85C, LQFP -144 pins, with trust zone core) controller for our product.
As per our requirement, We have activated TrustZone security is activated(Option bit TZEN=1) and Tread-X middleware in M33NS cause as well as trust zone security
We have enabled trust zone security and also enabled the middleware of TreadX in M33NS reason.
The non-secure reason is directly accessible from the secure reason, according to the paper below.
I have some questions regarding the secure reason project which is mentioned below
1. I noticed that the secure project has a while loop and int main(). What is the purpose of this while loop?
2. Can I create threads or tasks in the secure reason project? As per our application, we have 4 tasks(Task-1:Display, Task-2:Metering, Task-3:Monitoring Metering data and Task4:Relay operation).
we want to create a certain task in Secure Reason because it is related to product/User safety points (like Task-3:Monitoring Metering data and Task4:Relay operation )
Can you provide guidance on how we can achieve this?
Thanks
Hiren R. Thumar
Solved! Go to Solution.
- Labels:
-
AzureRTOS
-
STM32U5 series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-05 9:54 AM
1. I noticed that the secure project has a while loop and int main(). What is the purpose of this while loop?
In case the secure to non-secure switch function is bypassed, the while loop is a protection against undefined state
2.
- ThreadX is secure aware, we can't have 2 instances of the scheduler in both secure and non-secure.
- If we launch the scheduler in secure, there is no way to switch to non-secure world.
- The best implementation in your case is to boot in secure, then run ThreadX in non-secure.
- Tasks 3 and 4 can access the assets in secure part using secure callable (SG) functions.
- You can define secure callable functions for either getting/setting "Monitoring Metering data" and "relay operation". These Functions can be called by Tasks 3 and 4, which will protect the assets and let you manage them in a secure way.
Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-05 9:54 AM
1. I noticed that the secure project has a while loop and int main(). What is the purpose of this while loop?
In case the secure to non-secure switch function is bypassed, the while loop is a protection against undefined state
2.
- ThreadX is secure aware, we can't have 2 instances of the scheduler in both secure and non-secure.
- If we launch the scheduler in secure, there is no way to switch to non-secure world.
- The best implementation in your case is to boot in secure, then run ThreadX in non-secure.
- Tasks 3 and 4 can access the assets in secure part using secure callable (SG) functions.
- You can define secure callable functions for either getting/setting "Monitoring Metering data" and "relay operation". These Functions can be called by Tasks 3 and 4, which will protect the assets and let you manage them in a secure way.
Best regards
