Time affected by reset?


i wonder if the rtc changes when modem resets bc of an exception. Bc i set the rtc and after few days it changes automaticly to an past date or future date.And the power is always on.
Sometimes 5 seconds changes, sometimes 1 minutes. And i dont know what causes this time changes. The only suspection is modem reseting bc of an exeption. it happens occantionaly in my code. But i m not sure. Is there anyone who has an idea about this?




How are you setting the RTC? Are you using the adl_rtcSetTIme() call?

If you are using the adl_rtcSetTime() call, ensure that your year field in the adl_rtcTime_t structure is 4 digits long (i.e. 2008, not 08). The adl_rtcSetTime() call will accept a 2 digit date and appear to set the time - and adl_rtcGetTime() will return the time you have just set - until the next reboot, when the time reverts to the last valid time set.

I found this by setting the time using adl_rtcSetTime(), then checking the time using the +CCLK at command. I found that I was getting negative years returned with the +CCLK command when I was only using two digits for the Year field in the adl_rtcSetTime() call.

BTW, +CCLK only requires two digits for the date field, not four.

This happens on a Q2686 running Oasis 2.02, Firmware R71a. Haven’t tested it on 2.10 yet.

Also, have you got a battery/supercap on the RTC-BAT input to your module? No RTC battery, no guarantee that the time will stay the same across reboots, and the time will certainly not stay set across power cycles.

ciao, Dave



thanks for the reply but i dont use adl_Setrtc command. i use adl_cmdcreate creating the AT+CCLK= command and i use the year digit as two byte.
i coundt get why the times differs. Anotherhing sometimes it goes to a future date upto 30 seconds from now. that shows it goes faster sometimes.
thanks for your idea that may be helpful also