This is a RTC additional function. This is only for Nucleo F401RE & F411RE mbed(Added L152RE, F334R8, L476RG & F746xx). If you connected battery backup circuit for internal RTC, you can make a power-off and reset condition. RTC still has proper time and date.
Dependents: Nucleo_rtos_sample PB_Emma_Ethernet
Please refer following NOTE information.
/users/kenjiArai/notebook/nucleo-series-rtc-control-under-power-onoff-and-re/
Diff: SetRTC.h
- Revision:
- 6:ef7d2c83034d
- Parent:
- 5:1a8e7aed053d
- Child:
- 7:fa32602e23ec
diff -r 1a8e7aed053d -r ef7d2c83034d SetRTC.h --- a/SetRTC.h Wed Feb 18 09:14:28 2015 +0000 +++ b/SetRTC.h Thu Feb 19 02:56:12 2015 +0000 @@ -7,7 +7,7 @@ * http://www.page.sannet.ne.jp/kenjia/index.html * http://mbed.org/users/kenjiArai/ * Created: October 24th, 2014 - * Revised: Feburary 18th, 2015 + * Revised: Feburary 19th, 2015 * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE @@ -38,12 +38,6 @@ #define RTC_DAT0 0x55aa55aa #define RTC_DAT1 0xaa55aa55 -enum { - UNKNOWN = -1, - OK = 0, - NG -}; - /** Check and set RTC module inside Nucleo STM32X CPU. * Latest Nucleo board has external LSE Crystal X2 but no proper setting both HW ans SW. * In addition, every power on and/or reset make initial condition even HW Backup condition. @@ -66,7 +60,7 @@ /** Check and Set RTC * @param none - * @return if proper setting = OK, if not = NG and UNKNOWN-> no support this program + * @return if proper setting = 1, if not = 0 */ int32_t SetRTC(void);