2026-02-24 10:18 AM - last edited on 2026-02-25 12:14 AM by mƎALLEm
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.
2026-03-24 7:35 AM
Hello @LisaB
Please refer to the article below to debug your HardFauld.
How to debug a HardFault on an Arm® Cortex®-M STM3... - STMicroelectronics Community