2018-02-10 12:59 AM
hi,
ALRAF bit is set in ISR register but doesn,t execute the rtc-irq handler.
i enabled NVIC_RTC.
2018-02-12 12:54 AM
KEIL 5
set alarm interrupt flag in isr doesn't go to the isr routine
please help me
2018-02-12 12:55 AM
code is
void RTC_ALRMAR_SET()
{RTC->WPR = 0xCA;RTC->WPR = 0x53;RTC->CR &=~ RTC_CR_ALRAE;while((RTC->ISR & RTC_ISR_ALRAWF) != RTC_ISR_ALRAWF){}
RTC->ALRMAR = RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | 1<<30(Week day selection mask) | 1<<4(setSecond tens in BCD format.);RTC->CR = RTC_CR_ALRAIE | RTC_CR_ALRAE;RTC->WPR = 0xFE;RTC->WPR = 0x64;}
2018-02-12 01:15 AM
In STM32L0x3 - according to the reference manual - RTC interrupts are routed to EXTI line 17. Did you enable this line?
EDIT: reference manual pg. 659 ff and pg. 285 ff.
2018-02-12 01:15 AM
Did you look in the reference manual ?
which one ?
what page are you on ?
which register is not being set ?
2018-02-12 01:22 AM
RM0367 Reference manual Ultra-low-power STM32L0x3 advanced ARM®-based 32-bit MCUs
page 662
register are set but doesn,t goes to the isr service routine,set the interrupt flag ISR register
2018-02-12 01:24 AM
i have enabled alarm and alarm interrupt using register RTC->CR = RTC_CR_ALRAIE | RTC_CR_ALRAE;
2018-02-12 01:38 AM
I didn't use the RTC before, my RTC is off chip to be more stable
this looks dodgy to me.
RTC->ALRMAR = RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | 1<<30(Week day selection mask) | 1<<4(set
Second tens in BCD format.);2018-02-12 02:35 AM
Thank you
i have not set EXTI Line 17.
after set it's working right now
thank you very much
2018-02-12 02:58 AM
Welcome. But then Jack Peacock mentioned the EXTI line issue on Feb 10th, asking you, whether you had enabled it. You simply answered 'no' and obviously did not look into it. Maybe there is something to learn from this .......