Added Restart(by RESET) function from Standby mode only for some Nucleo boards (STM32 series)

Dependencies:   LPC1114_WakeInterruptIn

Dependents:   Check_StandBy

Fork of WakeUp by Erik -

Example program using "Standby function" for Nucleo series is here.
/users/kenjiArai/code/Check_StandBy/

Files at this revision

API Documentation at this revision

Comitter:
Sissors
Date:
Wed Jul 01 19:33:12 2015 +0000
Parent:
18:13aed323e040
Child:
20:68f2ee917691
Commit message:
Fixed for KSDK targets because Freescale couldn't agree if they called the oscillator "OSC" or "OSC0"

Changed in this revision

Device/WakeUp_Freescale.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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 {