STM32N6 – HardFault (INVPC) when calling tx_thread_schedule() in Non-Secure
Hi everyone,
I’m working on an STM32N6 project configured with:
-
ThreadX running in Non-Secure
-
SAU configured
-
RISAF configured
-
External Memory Manager enabled(Load and Run mode)
The project is very simple. However, when debugging the Non-Secure application, as soon as tx_thread_schedule() is called, execution jumps to HardFault.
The Fault Analyzer reports: “Attempt to do exception with bad value in EXEC_RETURN number (INVPC)”.
The code is loaded in external flash memory using Load and Run mode, the signed bin files are uploaded in the external flash using STM32CubeProg and then debugged using STM32CubeIDE.
Has anyone experienced INVPC errors on STM32N6 with ThreadX in Non-Secure?
Any suggestions would be greatly appreciated.
