[Taranis X9E] Problem when pressing long the PWR button on power off, I

revert Mike's change for now
This commit is contained in:
bsongis
2015-07-01 08:00:50 +02:00
parent eef6bb0342
commit 9dc1f2d5f8
+3
View File
@@ -88,6 +88,8 @@ void pwrOff()
// key is held pressed by the user // key is held pressed by the user
while (1) { while (1) {
wdt_reset(); wdt_reset();
#if 0
// It doesn't work correctly, if we press long on the pwr button, the radio restarts when the button is released
PWR->CR |= PWR_CR_CWUF; PWR->CR |= PWR_CR_CWUF;
/* Select STANDBY mode */ /* Select STANDBY mode */
PWR->CR |= PWR_CR_PDDS; PWR->CR |= PWR_CR_PDDS;
@@ -95,6 +97,7 @@ void pwrOff()
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
/* Request Wait For Event */ /* Request Wait For Event */
__WFE(); __WFE();
#endif
} }
#endif #endif
} }