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: SimpleDMA eeprom mbed-rtos mbed
Fork of CDMS_CODE_FM_28JAN2017 by
RESET_functions.h
- Committer:
- ee12b079
- Date:
- 2016-07-06
- Revision:
- 235:c127b15409b2
- Parent:
- 209:63e9c8f8b5d2
- Child:
- 248:407ab7e337cd
- Child:
- 253:fd6696d91e74
File content as of revision 235:c127b15409b2:
void RESET_COMRX();
void RESET_RTC();
void RESET_COMRX()
{
COM_RX_CNTRL = 0;
wait_ms(10);
COM_RX_CNTRL =1;
}
void RESET_RTC()
{
gCS_RTC=1;
gCS_RTC=0;
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
wait(4000);
//clearing the halt bit
gCS_RTC=1;
gCS_RTC=0;
spi.write(0x8C);
spi.write(0x00);
//clearing the OF bit
gCS_RTC=1;
gCS_RTC=0;
spi.write(0x8F);
spi.write(0x00);
}
