by mstempin Tue Aug 16, 2016 8:19 am
The event you get is not the RTC overflow, it is the watchdog refresh event.
Regarding the watchdog, the given period is divided by 2 to make sure to meet the deadline: e.g. if you provide 16 s, the timer will trigger an interrupt every 8 s so it can be refreshed before the fatal 16 s.
When you do nothing and exit from TD_USER_Loop(), the system will go bac kto EM2 mode with just the LEUART and RTC running, with a power consumption of 1.3µA typical. I don't know what causes the power consumption you measure, can you try to measure using the standard AT firmware?
It is possible to use either the RTC overflow directly, or to use the TD_SCHEDULER. The last solution draws the TD_SCHEDULER in your firmware, which uses quite a bit of Flash memory because of its complexity. If you really need the complexity because you run many independent timers at the same time, it is the best solution. But if you only require a long timer and nothing more, the direct RTC solution is better.