cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743 IWDG continuously reset MCU

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?

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Principal III

Is IWDG accidently activated by user option bytes?

View solution in original post

3 REPLIES 3
KnarfB
Principal III

Is IWDG accidently activated by user option bytes?

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)

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

JW