Skip to main content
oleksandr.karbivsky
Senior II
July 9, 2020
Solved

STM32H743 IWDG continuously reset MCU

  • July 9, 2020
  • 3 replies
  • 1889 views

Strange behavior of STM32H743. It continuously reset every few seconds.

I check reset reason with this part of code after system startup:

if (__HAL_RCC_GET_FLAG(RCC_FLAG_IWDG1RST))
 {
 _PRINTF("RESET_CAUSE_INDEPENDENT_WATCHDOG_RESET\n");
 }
 else if (__HAL_RCC_GET_FLAG(RCC_FLAG_SFTRST))
 {
 _PRINTF("RESET_CAUSE_SOFTWARE_RESET\n");
 }
 else if (__HAL_RCC_GET_FLAG(RCC_FLAG_PORRST))
 {
 _PRINTF("RESET_CAUSE_POWER_ON_POWER_DOWN_RESET\n");
 }
 else if (__HAL_RCC_GET_FLAG(RCC_FLAG_PINRST))
 {
 _PRINTF("RESET_CAUSE_EXTERNAL_RESET_PIN_RESET\n");
 }
 else if (__HAL_RCC_GET_FLAG(RCC_FLAG_BORRST))
 {
 _PRINTF("RESET_CAUSE_BROWNOUT_RESET\n");
 }
 else
 {
 _PRINTF("RESET_CAUSE_UNKNOWN\n");
 }

After first power up it prints: "RESET_CAUSE_POWER_ON_POWER_DOWN_RESET", and then "RESET_CAUSE_INDEPENDENT_WATCHDOG_RESET" every few seconds.

I commented IWDG initialization, but it didn`t help. When I download this code to the similar device, all work good.

Maybe MCU IWDG hardware part is broken?

This topic has been closed for replies.
Best answer by KnarfB

Is IWDG accidently activated by user option bytes?

3 replies

KnarfB
KnarfBBest answer
Super User
July 9, 2020

Is IWDG accidently activated by user option bytes?

oleksandr.karbivsky
Senior II
July 9, 2020

Thank you!

I check this. At good behavior board, register FLASH_OPTSR_CUR: IWDG1_SW bit is 1, at continuously reset board is 0. (0: IWDG1 watchdog is controlled by hardware 1: IWDG1 watchdog is controlled by software)

waclawek.jan
Super User
July 9, 2020

Divide et impera. Remove roughly half of your program, still resets? Keep dissecting until the reset stops to occur.

JW