Merge pull request #440 from ismb-pert/fix-sleep
Fixing sleep on stm32w108 cpu
This commit is contained in:
commit
4899e34882
|
@ -31,7 +31,6 @@
|
||||||
#include "contiki-lib.h"
|
#include "contiki-lib.h"
|
||||||
#include "contiki-net.h"
|
#include "contiki-net.h"
|
||||||
|
|
||||||
#include "sleep.h"
|
|
||||||
#include "board-sensors.h"
|
#include "board-sensors.h"
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
|
|
||||||
|
@ -167,7 +166,7 @@ PROCESS_THREAD(udp_client_process, ev, data)
|
||||||
if(etimer_expired(&wake_timer)){ // if timer hasn't expired do not go in deep sleep, in order to receive a response.
|
if(etimer_expired(&wake_timer)){ // if timer hasn't expired do not go in deep sleep, in order to receive a response.
|
||||||
printf("Sleeping...\r\n");
|
printf("Sleeping...\r\n");
|
||||||
halBoardPowerDown();//sensorsPowerDown();
|
halBoardPowerDown();//sensorsPowerDown();
|
||||||
sleep_seconds(SLEEP_INTERVAL_SECONDS); // Put system in deep sleep mode for a while.
|
clock_wait(SLEEP_INTERVAL_SECONDS * 1000); // Put system in deep sleep mode for a while.
|
||||||
halBoardPowerUp();//sensorsPowerUp();
|
halBoardPowerUp();//sensorsPowerUp();
|
||||||
printf("Awake\r\n");
|
printf("Awake\r\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue