Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FreescaleIAP SimpleDMA eeprom mbed-rtos mbed
Fork of CDMS_QM_03MAR2017_Flash_with_obsrs by
Diff: cdms_rtc.h
- Revision:
- 255:642ea552ac77
- Parent:
- 245:da9d1bd999da
- Child:
- 282:74a04dec4b95
diff -r c766afa330a3 -r 642ea552ac77 cdms_rtc.h
--- a/cdms_rtc.h Mon Jul 11 12:30:41 2016 +0000
+++ b/cdms_rtc.h Mon Jul 11 14:33:02 2016 +0000
@@ -12,6 +12,11 @@
spi.write(0x81); //register address with write flag
spi.write(0x80);//enabling stop bit in the seconds register
gCS_RTC=1;
+
+ gCS_RTC=0;
+ spi.write(0x81);
+ spi.write(0x00);//disabling the stop bit to restart the oscillator
+ gCS_RTC=1;
//clearing the halt bit
gCS_RTC=1;
@@ -31,12 +36,6 @@
spi.write(0x80|0x03);
spi.write(0x00);
gCS_RTC=1;
-
-
- gCS_RTC=0;
- spi.write(0x81);
- spi.write(0x00);//disabling the stop bit to restart the oscillator
- gCS_RTC=1;
gCS_RTC=0;
spi.write(0x80);
