Revised by I. Cserny

Dependents:   Lab04_Check_StandBy_os2 Lab04_wakeup_STM32

Embed: (wiki syntax)

« Back to documentation index

WakeUp Class Reference

WakeUp Class Reference

Class to make wake up a STM CPU from deepsleep using a low-power timer. More...

#include <WakeUp_STM32.h>

Static Public Member Functions

static void standby_then_reset (uint32_t ms)
 Enter Standby mode then Reset.

Detailed Description

Class to make wake up a STM CPU from deepsleep using a low-power timer.

 #include "mbed.h"
 #include "WakeUp_STM32.h"
 
 DigitalOut myled(LED1);
 
 int main() {
     uint32_t loop_count = 1;
     wait(1);
     while(true) {
         myled = !myled;
         if (++loop_count > 4) {
             WakeUp::standby_then_reset(30000);  // 30sec
             while(true) {;} // never executing this line
         }
     }
 }

Definition at line 48 of file WakeUp_STM32.h.


Member Function Documentation

void standby_then_reset ( uint32_t  ms ) [static]

Enter Standby mode then Reset.

Parameters:
msrequired time in milliseconds

Definition at line 130 of file WakeUp_STM32.cpp.