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:
Thu Jan 01 05:16:38 2015 +0000
Parent:
1:921a188e61c0
Child:
3:babcde30190d
Commit message:
Modified comments

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
--- a/CheckRTC.cpp	Sat Nov 01 01:46:04 2014 +0000
+++ b/CheckRTC.cpp	Thu Jan 01 05:16:38 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:  November   1st, 2014
+ *      Revised:  January    1st, 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,25 +24,15 @@
 
 //  Definition ------------------------------------------------------------------------------------
 #ifdef DEBUG
-#define BAUD(x)         pcm.baud(x)
-#define GETC(x)         pcm.getc(x)
-#define PUTC(x)         pcm.putc(x)
 #define PRINTF(...)     pcm.printf(__VA_ARGS__)
-#define READABLE(x)     pcm.readable(x)
 #else
-#define BAUD(x)         {;}
-#define GETC(x)         {;}
-#define PUTC(x)         {;}
 #define PRINTF(...)     {;}
-#define READABLE(x)     {;}
 #endif
 
 //  Object ----------------------------------------------------------------------------------------
 #ifdef DEBUG
 Serial pcm(USBTX, USBRX);
 #endif
-//DigitalOut myled(LED1);
-//Timer t;
 
 //  RAM -------------------------------------------------------------------------------------------
 
@@ -73,7 +63,8 @@
 #endif
 }
 
-uint32_t get_RTCSEL(void){
+uint32_t get_RTCSEL(void)
+{
 #if defined(TARGET_NUCLEO_F401RE) || defined(TARGET_NUCLEO_F411RE)
     return ((RCC->BDCR >> 8) & 0x03);
 #elif defined(TARGET_NUCLEO_L152RE)
--- a/CheckRTC.h	Sat Nov 01 01:46:04 2014 +0000
+++ b/CheckRTC.h	Thu Jan 01 05:16:38 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:  November   1st, 2014
+ *      Revised:  January    1st, 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