2020-07-09 05:08 AM
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?
Solved! Go to Solution.
2020-07-09 05:25 AM
Is IWDG accidently activated by user option bytes?
2020-07-09 05:25 AM
Is IWDG accidently activated by user option bytes?
2020-07-09 05:39 AM
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)
2020-07-09 05:51 AM
Divide et impera. Remove roughly half of your program, still resets? Keep dissecting until the reset stops to occur.
JW