[riot-devel] RIOT Power-Management-Strategy for Wireless-Sensor-Networking

Bernhard Nägele bernhard at naegele-privat.de
Sun Feb 21 12:15:36 CET 2016


Hello everyone,
the sensors in a WSN-Environment need very often to save as much power 
as possible.
Therefore you have normally a power-profile when which device is 
sleeping/power-down-mode etc..
Before I make some trials with implementing such a scenario I want to 
hear some opinions/thoughts about the correct way to handle this with RIOT.
As far as I see a good starting point is the example 
"timer_periodic_wakeup". This example configures
the MCU to be in a periodic sleep mode.
Question 1: What is the correct way to integrate the external devices 
(sensors, radio modules) into this
scenario. I think the user has to configure the device to get into sleep 
mode and to wake up inside the while(1) loop by himself - like this:
while(1)
{
     make mesurement/send data
     bring the device into power-down mode
     xtimer_usleep_until......
     wake up the device
}
Is this correct?

Question 2: How to handle the threads correctly in this scenario? For 
example you have a sensor and a
radio modul. The sensor makes several measurements before the radio 
module sends data. If you make
fork 2 threads - one for measurement and one for data-transmission - how 
could it be handled that
the measurement thread should be invoked more often than the other thread.

Question 3: How to handle the threads in relationship with the 
"timer_periodic_wakeup" scenario.

Thank you for your hints!
Best regards,
Bernhard



More information about the devel mailing list