Index: firmware/App/Controllers/TemperatureSensors.c =================================================================== diff -u -r0d1a270e86f26fc2ba145cb9aaa036bf09bcc6c1 -r47ac2fffcf33a27396bc924068d9e320cd1cd684 --- firmware/App/Controllers/TemperatureSensors.c (.../TemperatureSensors.c) (revision 0d1a270e86f26fc2ba145cb9aaa036bf09bcc6c1) +++ firmware/App/Controllers/TemperatureSensors.c (.../TemperatureSensors.c) (revision 47ac2fffcf33a27396bc924068d9e320cd1cd684) @@ -8,7 +8,7 @@ * @file TemperatureSensors.c * * @author (last) Dara Navaei -* @date (last) 25-Jan-2023 +* @date (last) 15-Mar-2023 * * @author (original) Dara Navaei * @date (original) 08-Apr-2020 @@ -454,6 +454,7 @@ case DG_MODE_FLUS: case DG_MODE_HEAT: + case DG_MODE_HCOL: case DG_MODE_CHEM: case DG_MODE_INIT: case DG_MODE_STAN: @@ -895,13 +896,11 @@ *************************************************************************/ static TEMPSENSORS_EXEC_STATES_T handleExecGetADCValues( void ) { - U32 errorCount = 0; U32 readCount = 0; - errorCount = (U32)getFPGARTDErrorCount(); readCount = (U32)getFPGARTDReadCount(); - checkFPGAPersistentAlarms( FPGA_PERS_ERROR_TWO_WIRE_ADC_TEMP_SENSORS, errorCount, readCount ); + checkFPGAPersistentAlarms( FPGA_PERS_ERROR_TWO_WIRE_ADC_TEMP_SENSORS, readCount ); processTempSnsrsADCRead( TEMPSENSORS_INLET_PRIMARY_HEATER, getFPGATPiTemp() ); processTempSnsrsADCRead( TEMPSENSORS_OUTLET_PRIMARY_HEATER, getFPGATPoTemp() ); processTempSnsrsADCRead( TEMPSENSORS_CONDUCTIVITY_SENSOR_1, getFPGACD1Temp() ); @@ -912,36 +911,36 @@ if ( ( getHardwareConfigStatus() != HW_CONFIG_BETA ) && ( getCurrentOperationMode() != DG_MODE_INIT ) ) #endif { - errorCount = (U32)getFPGATHdErrorCount(); readCount = (U32)getFPGATHdReadCount(); - checkFPGAPersistentAlarms( FPGA_PERS_ERROR_THD_ADC_TEMP_SENSORS, errorCount, readCount ); + checkFPGAPersistentAlarms( FPGA_PERS_ERROR_THD_ADC_TEMP_SENSORS, readCount ); processTempSnsrsADCRead( TEMPSENSORS_HEAT_DISINFECT, getFPGATHdTemp() ); + + // Make sure the baro sensor coefficients are not corrupted + checkBaroSensorCRC(); + processTempSnsrsADCRead( TEMPSENSORS_INTERNAL_THD_RTD, getFPGATHdInternalTemp() ); // Make sure the baro sensor coefficients are not corrupted checkBaroSensorCRC(); baroConvConsts.refTemperature = getFPGABaroReferenceTemperature(); baroConvConsts.temperatureCoeff = getFPGABaroTempCoeffOfTemperature(); - errorCount = getFPGABaroErrorCount(); readCount = getFPGABaroReadCount(); - checkFPGAPersistentAlarms( FPGA_PERS_ERROR_BARO_SENSOR, errorCount, readCount ); + checkFPGAPersistentAlarms( FPGA_PERS_ERROR_BARO_SENSOR, readCount ); processTempSnsrsADCRead( TEMPSENSORS_BAROMETRIC_TEMP_SENSOR, getFPGABaroTemperature() ); } - errorCount = (U32)getFPGATRoErrorCount(); readCount = (U32)getFPGATRoReadCount(); - checkFPGAPersistentAlarms( FPGA_PERS_ERROR_TRO_ADC_TEMP_SENSORS, errorCount, readCount ); + checkFPGAPersistentAlarms( FPGA_PERS_ERROR_TRO_ADC_TEMP_SENSORS, readCount ); processTempSnsrsADCRead( TEMPSENSORS_OUTLET_REDUNDANT, getFPGATRoTemp() ); processTempSnsrsADCRead( TEMPSENSORS_INTERNAL_TRO_RTD, getFPGATRoInternalTemp() ); - errorCount = (U32)getFPGATDiErrorCount(); readCount = (U32)getFPGATDiReadCount(); - checkFPGAPersistentAlarms( FPGA_PERS_ERROR_TDI_ADC_TEMP_SENSORS, errorCount, readCount ); + checkFPGAPersistentAlarms( FPGA_PERS_ERROR_TDI_ADC_TEMP_SENSORS, readCount ); processTempSnsrsADCRead( TEMPSENSORS_INLET_DIALYSATE, getFPGATDiTemp() ); processTempSnsrsADCRead( TEMPSENSORS_INTERNAL_TDI_RTD, getFPGATDiInternalTemp() );