cancel
Showing results for 
Search instead for 
Did you mean: 

Microcontroller debug unit on STM32H753

seb536
Associate

Hello,

I'm having an issue to use the Microcontroller debug unit (DBGMCU) on STM32H753.

I have got IWDG set up and working as expected and would like to have the IWDG frozen during debugging.

I have set the DBG_IIWDG1 (bit 18) of register DBGMCU_APB4FZ1 to 1 but that doesn't seem to have any effect as the watchdog still runs and reset in debug mode.

My initialisation sequence is:

 - Enable LSI Clck

 - Freeze IWDG In Debug Mode (DBG_IIWDG1)

 - Enable IWDG (WDG_KR)

 - Enable Write Access (WDG_KR)

 - Set Prescaler (WDG_PR)

 - Set Reload Counter (WDG_RLR)

I couldnt find any examples in STMCube related to the Microcontroller debug unit. Please could you help ?

Thanks

Seb

1 REPLY 1
Sarra.S
ST Employee

Hello @seb536, welcome to ST Community,

Add  __HAL_RCC_DBGMCU_CLK_ENABLE() before calling HAL_DBGMCU_FREEZE_IWDG or  setting  the DBG_IIWDG1 bit in DBGMCU_APB4FZ1 (it's basically the same thing) 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.