I have a ChibiOS 3.x program on a STM32F4 microcontroller where I use the IWDG watchdog to reset the MCU on errors like this:
When using the ST HAL, the right macro to use is:
__HAL_DBGMCU_FREEZE_IWDG()