[riot-devel] GNRC with sleepy nodes
Teemu Hakala (iki)
temmi at iki.fi
Wed Nov 22 08:47:08 CET 2017
I for one have been missing support for RTC that would enable MCU sleep and wake up the system via ISR callback when requested. How about making a pull request out of this and make it part of RIOT? I'm seeing the copyleft licensing is LGPL so it should be good.
> On 22 Nov 2017, at 8:44, Oleg Artamonov <oleg at unwds.com> wrote:
> We have two xtimer-like RTC-based timers implemented on STM32L1:
> * https://github.com/unwireddevices/RIOT/tree/loralan-public/sys/rtctimers <https://github.com/unwireddevices/RIOT/tree/loralan-public/sys/rtctimers> — rtctimers for ~1 second to 1 week delays, it uses regular RTC calendar
> * https://github.com/unwireddevices/RIOT/tree/loralan-public/sys/rtctimers-millis <https://github.com/unwireddevices/RIOT/tree/loralan-public/sys/rtctimers-millis> — rtctimers-millis for ~1 ms to 1 min delays, it uses RTC_SSR subseconds register (not available on some devices) and RTC calendar seconds register
> * RTC_SSR driver implementation — https://github.com/unwireddevices/RIOT/blob/loralan-public/cpu/stm32l1/periph/rtc.c <https://github.com/unwireddevices/RIOT/blob/loralan-public/cpu/stm32l1/periph/rtc.c>
> P.S. On STM32L1, regular XTIMER can not run from 32 kHz clock in stop or standby mode, as all TIMx timers need APB1 clocking. Switching xtimer to RTC clock will degrade its resolution.
> Sincerely yours,
> Oleg Artamonov
> +7 (916) 631-34-90
> www.unwds.com <http://www.unwireddevices.com/>
> 21.11.2017, 19:27, "Daniel Evans" <photonthunder at gmail.com>:
>> First, I should add that I currently have a working samd21 low power implementation but to accomplish that I use rtt.c for my always running clock and then standby sleep the module whenever it gets to the idle task. This is a hack and is not a clean implementation and means you don’t use XTIMER and no use of the nice built in protocols, I have my own hacked LoRa mesh network.
>> Referring specifically to the samd21, which includes the samr21 and loosely the saml21, this is the path as I see it for getting low power working natively with RIOT:
>> 1) Add a method to make setting up the generic clocks that includes run in standby and on demand options.
>> 2) Add flags for peripherals so that you can set the clock and run in standby
>> 3) Tweak XTIMER so that it can be run by a low power 32kHz clock when sleeping
>> All of these things have been discussed and are in the works and are on the list but not currently top priority. Low power is critical for my application and I am a little surprised it isn’t for more users, but I imagine others just hack around it as well?
>> Hope that helps a little,
>>> On Nov 21, 2017, at 6:07 AM, Francisco Molina <francisco.molina at inria.cl <mailto:francisco.molina at inria.cl>> wrote:
>>> >Issues #7743 and #7332 both discuss the problem.
>>> I saw those issues but they only refer to the fact that xtimer doesn't run during sleep modes, is that the only issue? Cheers
>>> devel mailing list
>>> devel at riot-os.org <mailto:devel at riot-os.org>
>>> https://lists.riot-os.org/mailman/listinfo/devel <https://lists.riot-os.org/mailman/listinfo/devel>,
>> devel mailing list
>> devel at riot-os.org <mailto:devel at riot-os.org>
>> https://lists.riot-os.org/mailman/listinfo/devel <https://lists.riot-os.org/mailman/listinfo/devel>_______________________________________________
> devel mailing list
> devel at riot-os.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the devel