Enter Standby mode then wake up(only restart) by RTC timer

Dependencies:   mbed WakeUp_STM32

see /users/kenjiArai/notebook/standby-mode-current-consumption-on-nucleo-f446re/

Committer:
kenjiArai
Date:
Thu Mar 12 09:29:18 2020 +0000
Revision:
2:4793eeeac6d0
Enter Standby mode then wake up(only restart) by RTC timer

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kenjiArai 2:4793eeeac6d0 1 /*
kenjiArai 2:4793eeeac6d0 2 * Check Mbed revision
kenjiArai 2:4793eeeac6d0 3 *
kenjiArai 2:4793eeeac6d0 4 * Copyright (c) 2020 Kenji Arai / JH1PJL
kenjiArai 2:4793eeeac6d0 5 * http://www7b.biglobe.ne.jp/~kenjia/
kenjiArai 2:4793eeeac6d0 6 * https://os.mbed.com/users/kenjiArai/
kenjiArai 2:4793eeeac6d0 7 * Revised: Feburary 16th, 2020
kenjiArai 2:4793eeeac6d0 8 * Revised: March 12th, 2020
kenjiArai 2:4793eeeac6d0 9 */
kenjiArai 2:4793eeeac6d0 10
kenjiArai 2:4793eeeac6d0 11 #include "mbed.h"
kenjiArai 2:4793eeeac6d0 12
kenjiArai 2:4793eeeac6d0 13 // RUN ONLY ON mbed-os5.15.1
kenjiArai 2:4793eeeac6d0 14 // https://github.com/ARMmbed/mbed-os/releases/tag/mbed-os-5.15.1
kenjiArai 2:4793eeeac6d0 15 #if (MBED_MAJOR_VERSION == 5) &&\
kenjiArai 2:4793eeeac6d0 16 (MBED_MINOR_VERSION == 15) &&\
kenjiArai 2:4793eeeac6d0 17 (MBED_PATCH_VERSION == 1)
kenjiArai 2:4793eeeac6d0 18 // RUN ONLY ON mbed 2.0.165
kenjiArai 2:4793eeeac6d0 19 #elif (MBED_MAJOR_VERSION == 2) &&\
kenjiArai 2:4793eeeac6d0 20 (MBED_MINOR_VERSION == 0) &&\
kenjiArai 2:4793eeeac6d0 21 (MBED_PATCH_VERSION == 165)
kenjiArai 2:4793eeeac6d0 22 #else
kenjiArai 2:4793eeeac6d0 23 # error "Please use Mbed-os5.15.1 or mbed 2.0.165"
kenjiArai 2:4793eeeac6d0 24 #endif
kenjiArai 2:4793eeeac6d0 25
kenjiArai 2:4793eeeac6d0 26 void print_revision(void)
kenjiArai 2:4793eeeac6d0 27 {
kenjiArai 2:4793eeeac6d0 28 printf("MBED_MAJOR_VERSION = %d, ", MBED_MAJOR_VERSION);
kenjiArai 2:4793eeeac6d0 29 printf("MINOR = %d, ", MBED_MINOR_VERSION);
kenjiArai 2:4793eeeac6d0 30 printf("PATCH = %d\r\n", MBED_PATCH_VERSION);
kenjiArai 2:4793eeeac6d0 31 }