void bl_init_clks(void) { watchdog_init(); PCONP = PCRTC; // switch off everything except RTC init_clks1(); init_clks2(); init_mam(); }
void lpm_end_awake(void) { if(lpm >= LPM_SLEEP) { // wake up from deep sleep init_clks2(); } lpm = LPM_ON; }
void lpm_awake(void) { #if LPM_DEBUG unsigned long usec = RTC_CTC; #endif if( lpm >= LPM_SLEEP ) { // wake up from deep sleep //benchmark init_clks1(); init_clks2(); // Debug tests #if LPM_DEBUG usec = RTC_CTC-usec; DEBUG("Wakeup in %lu usecs\n",usec * 31); #endif } lpm = LPM_ON; }