2025-05-22 12:27 AM
Hi all,
I'm trying to implement the Independent Watchdog Timer (IWDT) on a TrustZone-enabled STM32U5 controller. My goal is to configure and run the IWDT from the Non-Secure (NS) area.
Here’s what I’ve done so far:
I have an Azure RTOS ThreadX-based application.
I've created a thread that runs every 10 seconds.
Inside this thread, I’m initializing the IWDT and then calling HAL_IWDG_Refresh().
I’ve configured the IWDT for a timeout of 11 seconds.
However, I’m getting a Hard Fault when this thread executes.
What I'm looking for:
A working reference or example of IWDT implementation in a ThreadX thread in the Non-Secure area on a TrustZone-enabled STM32 (e.g., STM32U585).
Guidelines on how and where to initialize the IWDT (Secure vs Non-Secure).
Any TrustZone-related permission issues I should be aware of (e.g., Secure access required to certain RCC or watchdog registers?).
Any best practices on refreshing IWDT from a thread instead of an interrupt or bare-metal loop.