Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed WakeUp_STM32
Diff: main.cpp
- Revision:
- 0:0ae81c915caf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Nov 11 14:51:50 2021 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+#include "WakeUp_STM32.h" // see at https://os.mbed.com/users/kenjiArai/code/WakeUp_STM32/
+
+DigitalOut myled(LED1);
+
+int main() {
+ uint32_t loop_count = 1;
+ while(true) {
+ // In run mode Imax = 44 mA
+ myled = !myled;
+ wait(0.25);
+ if (++loop_count > 4) {
+ WakeUp::standby_then_reset(30000); // 30sec
+ // In standby mode I = 3.7 uA
+ while(true) {;} // never executing this line
+ }
+ }
+}