Index: firmware/App/Services/FPGA.c =================================================================== diff -u -r8b9dd16bff3c3a7debdbd4c1f0c06759fe97d0bf -r469657f3a161804b5f5541c2b12d22c70eae78f0 --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision 8b9dd16bff3c3a7debdbd4c1f0c06759fe97d0bf) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision 469657f3a161804b5f5541c2b12d22c70eae78f0) @@ -91,8 +91,10 @@ #define FPGA_GPIO_POWER_STATUS_PIN 7 ///< FPGA GPIO power status pin. #define FPGA_READ_V3_START_BYTE_NUM 256 ///< FPGA V3 read sensors start byte number. #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 ) + #define PROCESSOR_FPGA_CLOCK_DIFF_TOLERANCE 1 ///< Tolerance for processor clock speed check against FPGA clock. // FPGA header struct. @@ -341,10 +343,8 @@ 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. -//#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 +static U16 currentFPGATimerCount_ms; ///< Current FPGA timer count in ms. +static U32 currentTimerCount_ms; ///< Current processor timer count in ms. // ********** private function prototypes ********** @@ -581,8 +581,6 @@ fpgaState = handleFPGAReceiveHeaderState(); break; - // TODO - sensor/ADC init/configuration states - case FPGA_STATE_RCV_ALL_SENSORS: fpgaState = handleFPGAReceiveAllSensorsState(); break; @@ -646,8 +644,6 @@ fpgaState = handleFPGAReadHeaderState(); break; - // TODO - sensor/ADC init/configuration states - case FPGA_STATE_WRITE_ALL_ACTUATORS: fpgaState = handleFPGAWriteAllActuatorsState(); break; @@ -902,7 +898,7 @@ *************************************************************************/ void execFPGAClockSpeedTest( void ) { -//#ifndef DEBUG_ENABLED - TODO: uncomment it DN-15SEPT2022 +#ifndef DEBUG_ENABLED U16 const newFPGATimerCount_ms = getFPGATimerCount(); U32 const newTimerCount_ms = getMSTimerCount(); U32 const diffFPGATimerCount = (U32)u16DiffWithWrap( currentFPGATimerCount_ms, newFPGATimerCount_ms ); @@ -922,7 +918,7 @@ currentFPGATimerCount_ms = newFPGATimerCount_ms; currentTimerCount_ms = newTimerCount_ms; -//#endif +#endif } /*********************************************************************//**