initial commit of kl25z rtc code. local changes for debug
Fork of KL25Z_RTC by
Diff: KL25Z_RTC.cpp
- Revision:
- 5:5f49823ac1a3
- Parent:
- 4:3bd0dc0c2b2e
--- a/KL25Z_RTC.cpp Sun Aug 25 22:13:55 2013 +0000 +++ b/KL25Z_RTC.cpp Fri Jun 26 17:35:24 2015 +0000 @@ -60,13 +60,12 @@ void KL25Z_RTC::RTC_Start( void) { rtc_init(); - + NVIC_EnableIRQ( RTC_Seconds_IRQn); - NVIC_EnableIRQ( RTC_IRQn); - + //NVIC_EnableIRQ( RTC_IRQn); // causes startup problems? NVIC_SetVector( RTC_Seconds_IRQn, (uint32_t)&_RTC_Seconds_IRQHandler); - NVIC_SetVector( RTC_IRQn, (uint32_t)&_RTC_IRQHandler); - + //NVIC_SetVector( RTC_IRQn, (uint32_t)&_RTC_IRQHandler); // causes startup problems? + RTC->TAR = RTC->TSR + _alarm; RTC->IER = RTC_IER_TSIE_MASK | RTC_IER_TAIE_MASK;