In the past, you need modify rtc_api.c in mbed-dev source code. From this revision, you can just use RTC function all of conditions (Normal, Reset, Stand-by, Power OFF).
Note
From now on, you do NOT need any modification for mbed-dev library because STM team updates rtc_api.c source code and support RTC function under reset & standby condition includes power off condition (You need additional VBAT back-up hardware).
Please refer following NOTE information.
/users/kenjiArai/notebook/nucleo-series-rtc-control-under-power-onoff-and-re/
uart_as_stdio/uart_as_stdio.h@14:4b03106ece1f, 2021-03-06 (annotated)
- Committer:
- kenjiArai
- Date:
- Sat Mar 06 08:29:51 2021 +0000
- Revision:
- 14:4b03106ece1f
run on mbed-os6.8.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kenjiArai | 14:4b03106ece1f | 1 | /* |
kenjiArai | 14:4b03106ece1f | 2 | * mbed Application program |
kenjiArai | 14:4b03106ece1f | 3 | * Redirect Standard Input/Output |
kenjiArai | 14:4b03106ece1f | 4 | * |
kenjiArai | 14:4b03106ece1f | 5 | * Copyright (c) 2021 Kenji Arai / JH1PJL |
kenjiArai | 14:4b03106ece1f | 6 | * http://www7b.biglobe.ne.jp/~kenjia/ |
kenjiArai | 14:4b03106ece1f | 7 | * https://os.mbed.com/users/kenjiArai/ |
kenjiArai | 14:4b03106ece1f | 8 | * Created: January 13th, 2021 |
kenjiArai | 14:4b03106ece1f | 9 | * Revised: January 14th, 2021 |
kenjiArai | 14:4b03106ece1f | 10 | */ |
kenjiArai | 14:4b03106ece1f | 11 | |
kenjiArai | 14:4b03106ece1f | 12 | #include "mbed.h" |
kenjiArai | 14:4b03106ece1f | 13 | |
kenjiArai | 14:4b03106ece1f | 14 | // Function prototypes -------------------------------------------------------- |
kenjiArai | 14:4b03106ece1f | 15 | uint8_t readable(void); |
kenjiArai | 14:4b03106ece1f | 16 | void putc(uint8_t c); |
kenjiArai | 14:4b03106ece1f | 17 | uint8_t getc(void); |
kenjiArai | 14:4b03106ece1f | 18 | void sleep_preparation(void); |