STM32H725 IWDG fails to initialize
Hi everyone,
I'm developing a bare-metal application with an STM32H725RG MCU using STM32CubeIDE (including HAL and code generation).
I want to use the IWDG1 for reliability purposes, but for some reason, it seems to not work for me at all - upon startup, the MCU enters the Error_Handler loop, due to the HAL_IWDG_Init call returning HAL_TIMEOUT.
In particular, I enabled the IWDG1 in the .ioc file editor, so it gets initialized and enabled by the generated HAL code. This enables the LSI as expected (RCC_CSR = 0x3), and I can confirm that the LSI itself works by outputting it to the RCC_MCO_2 pin.
However, the initialization of the IWDG doesn't seem to complete. As far as I can tell from debugging, all the initial writes to IWDG_KR work as expected, and IWDG_PR and IWDG_RLR receive their correct values. This results in IWDG_SR = 0x3 as expected, which should go back to 0x0 within a few LSI cycles as the changes are applied - but this never happens. Instead, IWDG_SR remains at 0x3 permanently, causing the initialization to time out and the MCU to get stuck.
There doesn't seem to be any mention of such behaviour in the datasheet, RM, or device errata - does anyone have any ideas about what could be going on?
Thanks,
Alex K
