Wake-up timer library to wake from deepsleep/power-down
Dependencies: LPC1114_WakeInterruptIn
Fork of WakeUp by
Diff: Device/WakeUp_Freescale.cpp
- Revision:
- 19:9d355da2770e
- Parent:
- 18:13aed323e040
--- a/Device/WakeUp_Freescale.cpp Wed Jul 01 19:28:55 2015 +0000 +++ b/Device/WakeUp_Freescale.cpp Wed Jul 01 19:33:12 2015 +0000 @@ -49,7 +49,11 @@ //Set clock if (is32kXtal()) { SIM->SOPT1 &= ~SIM_SOPT1_OSC32KSEL_MASK; //Put RTC/LPTMR on 32kHz external. + #ifdef OSC0 OSC0->CR |= OSC_CR_EREFSTEN_MASK; + #else + OSC->CR |= OSC_CR_EREFSTEN_MASK; + #endif LPTMR0->PSR = LPTMR_PSR_PCS(2); counts = (uint32_t)((float)ms * 32.768f); } else {