Revert "samples: boards: stm32: pm: standby_shutdown: use hwinfo_get_reset_cause()"
This reverts commit ceb21b733b
.
Signed-off-by: Kenneth J. Miller <ken@miller.ec>
This commit is contained in:
parent
8adc90dfbc
commit
2e3b2e18de
1 changed files with 5 additions and 2 deletions
|
@ -96,16 +96,19 @@ void main(void)
|
|||
hwinfo_get_reset_cause(&cause);
|
||||
hwinfo_clear_reset_cause();
|
||||
|
||||
if (cause == RESET_LOW_POWER_WAKE) {
|
||||
hwinfo_clear_reset_cause();
|
||||
if ((LL_PWR_IsActiveFlag_SB() == true) && (cause == 0)) {
|
||||
LL_PWR_ClearFlag_SB();
|
||||
LL_PWR_ClearFlag_WU();
|
||||
printk("\nReset cause: Standby mode\n\n");
|
||||
}
|
||||
|
||||
if (cause == (RESET_PIN | RESET_BROWNOUT)) {
|
||||
LL_PWR_ClearFlag_WU();
|
||||
printk("\nReset cause: Shutdown mode or power up\n\n");
|
||||
}
|
||||
|
||||
if (cause == RESET_PIN) {
|
||||
LL_PWR_ClearFlag_WU();
|
||||
printk("\nReset cause: Reset pin\n\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue