cancel
Showing results for 
Search instead for 
Did you mean: 

Cortex-M33/STM32U5 - unprivileged mode in secure not working?!

42Bastian Schick
Associate III


Ask this at arm.com, but maybe it is STM32U5 specific:

I try run an unprivileged application in secure mode and get a strange behavior:

STM32U5 has TZ enabled, all application runs in secure mode.

1) LR = 0xffff_fff9, CONTROL = 1 => BX LR increments the SP, but all registers become 0 (including PC and XPSR!)

2) When setting CONTROL = 1 and executing SVC, SP is decremented correctly, but nothing is stored on the stack?

I check all errata I could find, but no hint.

If TZ is disabled, the system behaves normal.

42Bastian

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
2 REPLIES 2
Bubbles
ST Employee

Hi @42Bastian Schick,

are you using main stack or process stack? Do you end up in some fault handler?

How exactly do you set the CONTROL, do you use CMSIS function or some tool-defined function or macro?

Be sure to check PM0264, for any tips.

Right now I don't know what could be the problem.

BR,

J

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

42Bastian Schick
Associate III