[Taranis X9E] Patch from Mike to save power on shutdown

This commit is contained in:
bsongis
2015-06-28 17:20:57 +02:00
parent bfb10cd539
commit 447ea6fb39
+7
View File
@@ -88,6 +88,13 @@ void pwrOff()
// key is held pressed by the user
while (1) {
wdt_reset();
PWR->CR |= PWR_CR_CWUF;
/* Select STANDBY mode */
PWR->CR |= PWR_CR_PDDS;
/* Set SLEEPDEEP bit of Cortex System Control Register */
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
/* Request Wait For Event */
__WFE();
}
#endif
}