stm32/modmachine: Add deepsleep support to reset_cause() for WB55.

pull/8459/head
Andrew Leech 2022-02-23 09:37:48 +11:00 zatwierdzone przez Damien George
rodzic 6b23f7d301
commit a41bc5a7ca
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -119,6 +119,12 @@ void machine_init(void) {
reset_cause = PYB_RESET_DEEPSLEEP;
PWR->SCR |= PWR_SCR_CSBF;
} else
#elif defined(STM32WB)
if (PWR->EXTSCR & PWR_EXTSCR_C1SBF) {
// came out of standby
reset_cause = PYB_RESET_DEEPSLEEP;
PWR->EXTSCR |= PWR_EXTSCR_C1CSSF;
} else
#endif
{
// get reset cause from RCC flags