initial commit of kl25z rtc code. local changes for debug
Fork of KL25Z_RTC by
Revision 5:5f49823ac1a3, committed 2015-06-26
- Comitter:
- ftagius
- Date:
- Fri Jun 26 17:35:24 2015 +0000
- Parent:
- 4:3bd0dc0c2b2e
- Commit message:
- initial local copy of kl25z real time clock init code;
Changed in this revision
KL25Z_RTC.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 3bd0dc0c2b2e -r 5f49823ac1a3 KL25Z_RTC.cpp --- 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;