Questions and discussions about the software that runs on the TD RF module itself.
ramon2015
 
Posts: 51
Joined: Mon Jul 06, 2015 4:06 pm

Double RTC event when appending timers

by ramon2015 Fri Apr 07, 2017 12:37 pm

Hi,

I know The RTC event wakes up the MCU every 8'32" by default:

13:56:19 .964> WakeUp(0);
14:04:51 .984> WakeUp(1); 0:08:32
14:13:23 .998> WakeUp(2); 0:08:32
14:21:56 .016> WakeUp(3); 0:08:33
14:30:28 .033> WakeUp(4); 0:08:32


But I have just discovered that this happen twice if I append a timer as defined below:

timer_Collector.timerId = TD_SCHEDULER_Append(period, 0 , 0, TD_SCHEDULER_INFINITE, measurement_TimerEnded, 1);

See log below:

12:53:06 .243> WakeUp(38); TRANSPORT_MODE; batVoltage is
12:59:32 .230> WakeUp(39); TRANSPORT_MODE; batVoltage is 0:06:26
13:01:38 .271> WakeUp(40); TRANSPORT_MODE; batVoltage is 0:02:06 0:08:32
13:08:04 .783> WakeUp(41); TRANSPORT_MODE; batVoltage is 0:06:26 0:08:32
13:10:10 .915> WakeUp(42); TRANSPORT_MODE; batVoltage is 0:02:06 0:08:32
13:16:37 .012> WakeUp(43); TRANSPORT_MODE; batVoltage is 0:06:27 0:08:33
13:18:43 .027> WakeUp(44); TRANSPORT_MODE; batVoltage is 0:02:06 0:08:33
13:25:09 .043> WakeUp(45); TRANSPORT_MODE; batVoltage is 0:06:26 0:08:32
13:27:15 .095> WakeUp(46); TRANSPORT_MODE; batVoltage is 0:02:06 0:08:32
13:33:41 .060> WakeUp(47); TRANSPORT_MODE; batVoltage is 0:06:26 0:08:32
13:35:47 .115> WakeUp(48); TRANSPORT_MODE; batVoltage is 0:02:06 0:08:32
13:42:13 .080> WakeUp(49); TRANSPORT_MODE; batVoltage is 0:06:26 0:08:32
13:44:19 .130> WakeUp(50); TRANSPORT_MODE; batVoltage is 0:02:06 0:08:32


Is there any way I can avoid the second 8'32" timer event?

Regards, Ramon.
ramon2015
 
Posts: 51
Joined: Mon Jul 06, 2015 4:06 pm

Re: Double RTC event when appending timers

by ramon2015 Mon Apr 24, 2017 7:44 am

Hi,

I have been trying to avoid these unwanted wakeups by disabling several features.

1- I rebuilt libdcore without the USE_KEEPALIVE define. This avoids RTC wakeup every 512 sec. Then I discover the following:
- Since I use the DOWNLNK_PROCESS this makes the system to wakeup periocally after dowlink is over.
- Since I append a custom timer (from here on: user timer) to the scheduler this also makes the the system to wakeup periocally acording to my configured timer, which is good, but also brings up other periodic counter that wake up the system.

I hvae tried to disable the system timers based on RTC via:

TD_RTC_EnableSystemInterrupts(false);

But it does NOT take effect. In spite of theis the system does wake up.

Could you please provide a solution on how to disable properly Sytem RTC timers so the system is only awaken on User RTC timers?

This is pretty criticcal because every time a donwlink is processed an additional timer is added. I have 1 daily DL message so as the time goes by, the system will be waking up constantly.

Regards, Ramon.
Return to Firmware

Who is online

Users browsing this forum: No registered users and 2 guests