Checking program for RTC module inside CPU.

Dependents:   RTC_w_COM Frequency_Counter_w_GPS_1PPS debug_tools Nucleo_RTC_Clock_setting ... more

Please refer below link.
http://developer.mbed.org/users/kenjiArai/notebook/nucleo-series-clock-structure-and-xtal-oscillation/

Files at this revision

API Documentation at this revision

Comitter:
kenjiArai
Date:
Sat May 16 23:34:53 2015 +0000
Parent:
2:2ee7a7260cbf
Commit message:
small modification

Changed in this revision

CheckRTC.cpp Show annotated file Show diff for this revision Revisions of this file
CheckRTC.h Show annotated file Show diff for this revision Revisions of this file
diff -r 2ee7a7260cbf -r babcde30190d CheckRTC.cpp
--- a/CheckRTC.cpp	Thu Jan 01 05:16:38 2015 +0000
+++ b/CheckRTC.cpp	Sat May 16 23:34:53 2015 +0000
@@ -3,11 +3,11 @@
  *      Check RTC function and set proper clock if we can set
  *      ONLY FOR "Nucleo Board"
  *
- *  Copyright (c) 2010-2014 Kenji Arai / JH1PJL
+ *  Copyright (c) 2010-2015 Kenji Arai / JH1PJL
  *  http://www.page.sannet.ne.jp/kenjia/index.html
  *  http://mbed.org/users/kenjiArai/
  *      Created:  October   24th, 2014
- *      Revised:  January    1st, 2015
+ *      Revised:  May       16th, 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
@@ -24,8 +24,10 @@
 
 //  Definition ------------------------------------------------------------------------------------
 #ifdef DEBUG
+#define PUTS(x)         pcm.puts(x)
 #define PRINTF(...)     pcm.printf(__VA_ARGS__)
 #else
+#define PUTS(x)         {;}
 #define PRINTF(...)     {;}
 #endif
 
@@ -48,7 +50,7 @@
 //-------------------------------------------------------------------------------------------------
 //  Control Program
 //-------------------------------------------------------------------------------------------------
-int32_t CheckRTC()
+int32_t CheckRTC(void)
 {
 #if defined(TARGET_NUCLEO_F401RE) || defined(TARGET_NUCLEO_F411RE) || defined(TARGET_NUCLEO_L152RE)
     if (rtc_external_osc_init() == OK) {
@@ -74,7 +76,6 @@
 #endif
 }
 
-
 #if defined(TARGET_NUCLEO_F401RE) || defined(TARGET_NUCLEO_F411RE) || defined(TARGET_NUCLEO_L152RE)
 int32_t Set_RTC_LSE(void)
 {
diff -r 2ee7a7260cbf -r babcde30190d CheckRTC.h
--- a/CheckRTC.h	Thu Jan 01 05:16:38 2015 +0000
+++ b/CheckRTC.h	Sat May 16 23:34:53 2015 +0000
@@ -3,11 +3,11 @@
  *      Check RTC function and set proper clock if we can set
  *      ONLY FOR "Nucleo Board"
  *
- *  Copyright (c) 2010-2014 Kenji Arai / JH1PJL
+ *  Copyright (c) 2010-2015 Kenji Arai / JH1PJL
  *  http://www.page.sannet.ne.jp/kenjia/index.html
  *  http://mbed.org/users/kenjiArai/
  *      Created:  October   24th, 2014
- *      Revised:  January    1st, 2015
+ *      Revised:  May       16th, 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
@@ -50,7 +50,7 @@
   * @param none
   * @return if proper setting = OK, if not = NG and UNKNOWN-> no support this program
   */
-int32_t CheckRTC(void);
+int32_t  CheckRTC(void);
 uint32_t get_RTCSEL(void);
 
 #endif      // CHECK_RTC_H