Dear Teemu, What you are describing sounds like the xtimer subsystem in RIOT. It uses a hardware timer to schedule tasks in the future. See examples/xtimer_periodic_wakeup in the RIOT sources for an example on how to achieve periodic scheduling for your task.
Also note that the function xtimer_usleep_until used in the example may be renamed xtimer_periodic_wakeup in a near future, see [1]. The functionality will remain the same and the example will be updated at the same time the rename happens. [1]: https://github.com/RIOT-OS/RIOT/pull/5612 Best regards, Joakim On Wed, Jul 13, 2016 at 10:53 AM, Teemu Hakala <[email protected]> wrote: > > > > On 12 Jul 2016, at 22:02, Kaspar Schleiser <[email protected]> wrote: > > > > The system gets woken up by external interrupts, e.g., a timer, > > gpio-pin. That powers up the MCU > > > thread_flag), that triggers the scheduler and > > > The scheduler never wakes up itself > > In this thinking concept of achieving some repetitive task, you should > perhaps configure a hw timer to create a stream of interrupts. > > Said interrupts then individually wake up mcu, go via irq handler and > start processing that then yields, allowing the scheduler to put mcu into > sleep mode. This is then repeated. > > Most normal modern mcus support configuring a timer for this purpose, the > interrupts can come from an external source or mcu internal peripherals > such as adc can act as interrupt stream generator. > > - t > _______________________________________________ > devel mailing list > [email protected] > https://lists.riot-os.org/mailman/listinfo/devel >
_______________________________________________ devel mailing list [email protected] https://lists.riot-os.org/mailman/listinfo/devel
