Randa Zarrouk

Switching back to the "Secure world" TrustZone (lpcxpresso55s69)

Discussion created by Randa Zarrouk on Sep 16, 2019
Latest reply on Sep 17, 2019 by Sabina Bruce
When using the security extension supported by the ARMv8-M, It is cited that when switching from a secure to a non-secure world, a call to a non secure world is conducted. It is noted that the comeback to the secure world is done automatically as quoted:
"During the state transition, the return address and some processor state information are pushed onto the Secure stack, while the return address on the Link Register (LR) is set to a special value called FNC_RETURN. The Least Significant Bit (LSB) of the
function address must be 0"  
Using the "Hello_world" example provided in the MCUXpresso IDE (also shown in this blog ), I added a PRINTF("Comeback to the secure world again"); expecting that it will be printed in the console. However, no thing happened. 
I added a break-point but it was not seen, this could mean that there where no switch back to the secure world. 
Is there a missing step that I should have included? Does it has to do with the Secure stack?  

Outcomes