Index: firmware/App/Services/FPGA.c =================================================================== diff -u -rf8b2a4fe19bf60994920d7e310069a70fdbaa60c -r8b9dd16bff3c3a7debdbd4c1f0c06759fe97d0bf --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision f8b2a4fe19bf60994920d7e310069a70fdbaa60c) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision 8b9dd16bff3c3a7debdbd4c1f0c06759fe97d0bf) @@ -93,12 +93,7 @@ #define FPGA_READ_V3_END_BYTE_NUM 430 ///< FPGA V3 read sensors end byte number. /// FPGA size of V3 read bytes. #define FPGA_SIZE_OF_V3_READ_BYTES ( FPGA_READ_V3_END_BYTE_NUM - FPGA_READ_V3_START_BYTE_NUM ) - -<<<<<<< HEAD #define PROCESSOR_FPGA_CLOCK_DIFF_TOLERANCE 1 ///< Tolerance for processor clock speed check against FPGA clock. -======= -#define PROCESSOR_FPGA_CLOCK_DIFF_TOLERANCE 1 ///< Tolerance for processor clock speed check against FPGA clock. ->>>>>>> a26a94535a8931d2a86487c48d55e4549934bfe8 // FPGA header struct. #pragma pack(push,1) @@ -346,19 +341,12 @@ static DG_FPGA_SENSORS_T fpgaSensorReadings; ///< DG FPGA sensors structure. static FPGA_ACTUATORS_T fpgaActuatorSetPoints; ///< FPGA actuator set points structure. static U08 fpgaReadByteSize; ///< FPGA read byte size. - -<<<<<<< HEAD //#ifndef DEBUG_ENABLED - TODO: uncomment it DN-15SEPT2022 static U16 currentFPGATimerCount_ms; ///< Current FPGA timer count in ms. static U32 currentTimerCount_ms; ///< Current processor timer count in ms. //#endif -======= -#ifndef DEBUG_ENABLED -static U16 currentFPGATimerCount_ms; ///< Current FPGA timer count in ms. -static U32 currentTimerCount_ms; ///< Current processor timer count in ms. -#endif ->>>>>>> a26a94535a8931d2a86487c48d55e4549934bfe8 + // ********** private function prototypes ********** static FPGA_STATE_T handleFPGAReadHeaderState( void ); @@ -920,15 +908,11 @@ U32 const diffFPGATimerCount = (U32)u16DiffWithWrap( currentFPGATimerCount_ms, newFPGATimerCount_ms ); U32 const diffTimerCount = u32DiffWithWrap( currentTimerCount_ms, newTimerCount_ms ); -<<<<<<< HEAD if ( getCurrentOperationMode() != DG_MODE_INIT ) -======= - if ( getCurrentOperationMode() != MODE_INIT ) ->>>>>>> a26a94535a8931d2a86487c48d55e4549934bfe8 { if ( abs( diffFPGATimerCount - diffTimerCount ) > PROCESSOR_FPGA_CLOCK_DIFF_TOLERANCE ) { - if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_CLOCK_SPEED_ERROR ) ) // DN-16SEPT2022 + if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_CLOCK_SPEED_ERROR ) ) { SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_FPGA_CLOCK_SPEED_CHECK_FAILURE, diffFPGATimerCount, diffTimerCount ); } @@ -2085,7 +2069,8 @@ *************************************************************************/ U16 getFPGATimerCount( void ) { - return fpgaSensorReadings.fpgaTimerCountMS; + //return fpgaSensorReadings.fpgaTimerCountMS; // Commented for testing ONLY. TODO: uncomment DN-20SEPT2022 + return fpgaSensorReadings.fpgaTimerCountMS + 5; // + 5 for tetsing ONLY. TODO: remove this line. DN-20SEPT2022 } /*********************************************************************//**