Index: NVDataMgmt.c =================================================================== diff -u -r0b10349505c18d7789b9174a383836c6a1ad2936 -rd6b9e2bb9886a4bf7954204710ddb571314b3b06 --- NVDataMgmt.c (.../NVDataMgmt.c) (revision 0b10349505c18d7789b9174a383836c6a1ad2936) +++ NVDataMgmt.c (.../NVDataMgmt.c) (revision d6b9e2bb9886a4bf7954204710ddb571314b3b06) @@ -3786,7 +3786,7 @@ BOOL status = FALSE; BOOL checkUIStatus = TRUE; - // Initialize the structure per CPPCheck run + // Initialize the structure per CppCheck run tempJob.memoryLocation = NVDATAMGMT_EEPROM; tempJob.memoryOperation = NVDATAMGMT_NONE; tempJob.recordJob = NVDATAMGMT_CALIBRATION_RECORD; Index: RTC.c =================================================================== diff -u -r11a039b03cef89e3589f738f9505232f96397820 -rd6b9e2bb9886a4bf7954204710ddb571314b3b06 --- RTC.c (.../RTC.c) (revision 11a039b03cef89e3589f738f9505232f96397820) +++ RTC.c (.../RTC.c) (revision d6b9e2bb9886a4bf7954204710ddb571314b3b06) @@ -1461,6 +1461,8 @@ if ( ( TRUE == isStatusOk ) && ( rxBuffer[ RTC_SECONDS_INDEX ] != RTCPreviousSecond ) ) { + updateReadTimestampStruct(); + ALARM_ID_T alarm; S32 elapsedTime = (S32)calcTimeSince( RTCSelfTestTimer ); S32 deltaTime = elapsedTime - (S32)MS_PER_SECOND; @@ -1504,7 +1506,7 @@ *************************************************************************/ static RTC_SELF_TEST_STATE_T handleSelfTestCheckRTCYear( void ) { - RTC_SELF_TEST_STATE_T state = RTC_SELF_TEST_STATE_CHECK_RTC_YEAR; + RTC_SELF_TEST_STATE_T state = RTC_SELF_TEST_STATE_COMPLETE; ALARM_ID_T alarm; #ifdef _DG_ @@ -1514,22 +1516,17 @@ alarm = ALARM_ID_HD_SET_RTC_YEAR_INVALID; #endif - if ( RTCTimestampStruct.years != 0 ) + // Check if the year is not 0, meaning that the year has been read + // If the year is greater than 2021, set as pass, otherwise fail POST + if ( RTCTimestampStruct.years > ( YEAR_2021 - YEAR_2000 ) ) { - // Check if the year is not 0, meaning that the year has been read - // If the year is greater than 2021, set as pass, otherwise fail POST - if ( RTCTimestampStruct.years > ( YEAR_2021 - YEAR_2000 ) ) - { - RTCSelfTestResult = SELF_TEST_STATUS_PASSED; - } - else - { - RTCSelfTestResult = SELF_TEST_STATUS_FAILED; - SET_ALARM_WITH_1_U32_DATA( alarm, (U16)RTCTimestampStruct.years ); - } - - state = RTC_SELF_TEST_STATE_COMPLETE; + RTCSelfTestResult = SELF_TEST_STATUS_PASSED; } + else + { + RTCSelfTestResult = SELF_TEST_STATUS_FAILED; + SET_ALARM_WITH_1_U32_DATA( alarm, (U16)RTCTimestampStruct.years ); + } return state; }