We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hi everyone
I'm usig stm32f103 and code below to set rtc alarm every one hour
RTC_Alarm_Time.Alarm = 1;
RTC_Alarm_Time.AlarmTime.Hours=RTC_Time.Hours+1; if (RTC_Alarm_Time.AlarmTime.Hours>23){ RTC_Alarm_Time.AlarmTime.Hours=0; } RTC_Alarm_Time.AlarmTime.Hours=RTC_Time.Hours; RTC_Alarm_Time.AlarmTime.Minutes=RTC_Time.Minutes; RTC_Alarm_Time.AlarmTime.Seconds=RTC_Time.Seconds; HAL_RTC_SetAlarm_IT(&hrtc, &RTC_Alarm_Time, RTC_FORMAT_BIN);
my problem is that it skips hour zero and after hour 23 it goes to hour 1.
i tried this code but it didnt worked too.
if(RTC_Time.Hours==23) { RTC_Alarm_Time.AlarmTime.Hours=0; } else { RTC_Alarm_Time.AlarmTime.Hours=RTC_Time.Hours+1; }
RTC_Alarm_Time.AlarmTime.Minutes=RTC_Time.Minutes; RTC_Alarm_Time.AlarmTime.Seconds=RTC_Time.Seconds;
appreciate your help.
What makes you thing this has anything to do with the Keil tools themselves?
What debugging have you done to find the problem?
For specific help with how to use ST products, you need to go to ST:
https://community.st.com/s/
To understand what "belongs" to the chip manufacturer (ST, in this case) and what "belongs" to ARM, see:
community.arm.com/.../158950