Index: RTC.c =================================================================== diff -u -rd8454083670704629941c95c1c57dee1a198784e -rc62f2826ae0e201841ea17b426c62c7e3d8b1a2a --- RTC.c (.../RTC.c) (revision d8454083670704629941c95c1c57dee1a198784e) +++ RTC.c (.../RTC.c) (revision c62f2826ae0e201841ea17b426c62c7e3d8b1a2a) @@ -723,8 +723,8 @@ *************************************************************************/ static BOOL isRTCFunctional( void ) { -#ifndef DISABLE_RTC_CONFIG BOOL hasTestPassed = TRUE; +#ifndef DISABLE_RTC_CONFIG U16 controlReg1 = rxBuffer[ RTC_REG_1_INDEX ]; U16 controlReg2 = rxBuffer[ RTC_REG_2_INDEX ]; U16 controlReg3 = rxBuffer[ RTC_REG_3_INDEX ]; @@ -770,9 +770,8 @@ SET_ALARM_WITH_2_U32_DATA( ALARM_ID_RTC_BATTERY_LOW, controlReg3, RTC_REG_3_BLF_MASK ); hasTestPassed = FALSE; } - - return hasTestPassed; #endif + return hasTestPassed; } /*********************************************************************//** @@ -1109,14 +1108,12 @@ { RTC_EXEC_STATE_T result = RTC_EXEC_STATE_WAIT_FOR_POST; -#ifndef DONT_SKIP_NV_POST if ( RTCSelfTestState == RTC_SELF_TEST_STATE_COMPLETE ) { - result = RTC_EXEC_STATE_IDLE; + // After POST is finished, first read the current time so there is one time stamp + // available in the memory + result = RTC_EXEC_STATE_READ; } -#else - result = RTC_EXEC_STATE_IDLE; -#endif return result; }