drivers: hwinfo: stm32: Deal with iwdgX and wwdgX instances
On some STM32 series (H7, MP1), iwdg and wwdg have multiple instances. Due to current driver implementation, these wdg instances were not checked in the function. Fixes #53002 Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
9cf89603df
commit
50473ec0a9
1 changed files with 20 additions and 0 deletions
|
@ -51,11 +51,31 @@ int z_impl_hwinfo_get_reset_cause(uint32_t *cause)
|
|||
flags |= RESET_WATCHDOG;
|
||||
}
|
||||
#endif
|
||||
#if defined(RCC_RSR_IWDG1RSTF)
|
||||
if (LL_RCC_IsActiveFlag_IWDG1RST()) {
|
||||
flags |= RESET_WATCHDOG;
|
||||
}
|
||||
#endif
|
||||
#if defined(RCC_RSR_IWDG2RSTF)
|
||||
if (LL_RCC_IsActiveFlag_IWDG2RST()) {
|
||||
flags |= RESET_WATCHDOG;
|
||||
}
|
||||
#endif
|
||||
#if defined(RCC_FLAG_WWDGRST)
|
||||
if (LL_RCC_IsActiveFlag_WWDGRST()) {
|
||||
flags |= RESET_WATCHDOG;
|
||||
}
|
||||
#endif
|
||||
#if defined(RCC_RSR_WWDG1RSTF)
|
||||
if (LL_RCC_IsActiveFlag_WWDG1RST()) {
|
||||
flags |= RESET_WATCHDOG;
|
||||
}
|
||||
#endif
|
||||
#if defined(RCC_RSR_WWDG2RSTF)
|
||||
if (LL_RCC_IsActiveFlag_WWDG2RST()) {
|
||||
flags |= RESET_WATCHDOG;
|
||||
}
|
||||
#endif
|
||||
#if defined(RCC_FLAG_FWRST)
|
||||
if (LL_RCC_IsActiveFlag_FWRST()) {
|
||||
flags |= RESET_SECURITY;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue