2017-01-11 03:21 AM
Hello,
I am using LSI clock(40KHz) as the RTC clock source and enabled the LSI using the
RCC_LSICmd(ENABLE);
I configured the RTC registers and the time is leading to the real time.
Initialised the RTC:
RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24;
RTC_InitStruct.RTC_AsynchPrediv = 99; RTC_InitStruct.RTC_SynchPrediv = 399; RTC_Init(&RTC_InitStruct);Can any one tell, how can I generate an RTC interrupt for every 1 second?
And also do am I missing any configuration in clock and prescaler setting?
Regards,
Sowmya
#rtc #stm #stm32f373 #stm32f373-rtcSolved! Go to Solution.
2017-01-11 08:16 AM
Hi
Sowmya,
Please refer to the 'RTC_LSI' example available under the SPL package:
(V1.2.3).The example is found under the path below:
'en.stm32f30x_dsp_stdperiph_lib\STM32F30x_DSP_StdPeriph_Lib_V1.2.3\Projects\STM32F30x_StdPeriph_Examples\RTC'
Khouloud.
2017-01-11 08:16 AM
Hi
Sowmya,
Please refer to the 'RTC_LSI' example available under the SPL package:
(V1.2.3).The example is found under the path below:
'en.stm32f30x_dsp_stdperiph_lib\STM32F30x_DSP_StdPeriph_Lib_V1.2.3\Projects\STM32F30x_StdPeriph_Examples\RTC'
Khouloud.
2017-01-11 09:10 AM
There doesn't look to be a 1HZ per-se, you have two alarms, and the Wake Up. You can get have it wake up once per second.
2017-01-12 03:10 AM
Thank you for the reply.
Changed the code by referring example and it is working.
But there is a 30seconds lag in time.
How can I fix it?