Index: firmware/App/Controllers/Pressures.c =================================================================== diff -u -rc230be1bd4296324bf5dfc288c212eb7c2ce5d2d -r14ab8d8d80fb3607d37d70d4e7a09bbb8dbc3055 --- firmware/App/Controllers/Pressures.c (.../Pressures.c) (revision c230be1bd4296324bf5dfc288c212eb7c2ce5d2d) +++ firmware/App/Controllers/Pressures.c (.../Pressures.c) (revision 14ab8d8d80fb3607d37d70d4e7a09bbb8dbc3055) @@ -121,7 +121,6 @@ static PRESSURE_STATE_T handlePressuresInitState( void ); static PRESSURE_STATE_T handlePressuresContReadState( void ); static void publishPressuresData( void ); -static SELF_TEST_STATUS_T handleSelfTestADCCheck( void ); static F32 calculateBaroPressure( U32 adcSum ); static F32 getCalibrationAppliedPressure( U08 sensorId, F32 pressure ); static F32 getBaroPressurePSI( void ); @@ -319,7 +318,7 @@ break; case PRESSURE_TEST_STATE_IN_PROGRESS: - pressuresSelfTestResult = handleSelfTestADCCheck(); + // currently no POST test to run for pressure sensors, but they are range checked regularly pressuresSelfTestState = PRESSURE_TEST_STATE_COMPLETE; break; @@ -460,42 +459,6 @@ /*********************************************************************//** * @brief - * The handleSelfTestADCCheck function checks whether the ADC reads and - * report status back. If the reads are above the maximum 12bit ADC count - * or equals zero, it will throw an alarm. - * @details Inputs: ADC reading for RO pump inlet pressure sensor - * @details Outputs: Performed ADC check self-test. - * @return result (SELF_TEST_STATUS_T) - *************************************************************************/ -static SELF_TEST_STATUS_T handleSelfTestADCCheck( void ) -{ - U08 i; - U16 sensorADC; - U16 sensorsADC[ PRESSURE_SENSORS_ADC_CHECK_ARRAY_LEN ]; - SELF_TEST_STATUS_T result = SELF_TEST_STATUS_PASSED; - - // Insert the pressure sensors ADC read into the array - sensorsADC[ 0 ] = getIntADCReading( INT_ADC_RO_PUMP_INLET_PRESSURE ); - sensorsADC[ 1 ] = getIntADCReading( INT_ADC_RO_PUMP_OUTLET_PRESSURE ); - sensorsADC[ 2 ] = getIntADCReading( INT_ADC_DRAIN_PUMP_INLET_PRESSURE ); - sensorsADC[ 3 ] = getIntADCReading( INT_ADC_DRAIN_PUMP_OUTLET_PRESSURE ); - - for ( i = 0; i < PRESSURE_SENSORS_ADC_CHECK_ARRAY_LEN; i++ ) - { - sensorADC = sensorsADC[ i ]; - - if ( ( 0 == sensorADC ) || ( sensorADC >= INT_ADC_FULL_SCALE_BITS ) ) - { - result = SELF_TEST_STATUS_FAILED; - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_PRESSURE_SENSOR_FAULT, i ); - } - } - - return result; -} - -/*********************************************************************//** - * @brief * The calculateBaroPressure function calculates the barometric pressure * @details Inputs: measuredPressureReadingsSum * @details Outputs: none Index: firmware/App/Controllers/TemperatureSensors.c =================================================================== diff -u -rc230be1bd4296324bf5dfc288c212eb7c2ce5d2d -r14ab8d8d80fb3607d37d70d4e7a09bbb8dbc3055 --- firmware/App/Controllers/TemperatureSensors.c (.../TemperatureSensors.c) (revision c230be1bd4296324bf5dfc288c212eb7c2ce5d2d) +++ firmware/App/Controllers/TemperatureSensors.c (.../TemperatureSensors.c) (revision 14ab8d8d80fb3607d37d70d4e7a09bbb8dbc3055) @@ -121,7 +121,6 @@ U32 alarmStartTime; ///< Alarm start time U08 sensorErrorBitStatus; ///< Temperature sensor error bit status BOOL fpgaErrorStatus; ///< Temperature sensor FPGA error status - BOOL adcErrorStatus; ///< Temperature sensor ADC error status S32 baroTempSnsrDiff; ///< Barometric sensor temperature difference } TEMP_SENSOR_T; @@ -184,12 +183,6 @@ static const U32 TWO_TO_POWER_OF_8 = ( 1 << 8 ); ///< 2^8. static const U32 TWO_TO_POWER_OF_23 = ( 1 << 23 ); ///< 2^23. -// The count cannot be within 0.1V of the rail on both sides therefore: -// Maximum ADC count -> (2^24) * ( 3.0V - 0.1V ) / 3V -// Minimum ADC count -> (2^24) * ( 0.1V - 0.0V ) / 3V -static const U32 TEMP_SENSORS_MAX_ADC_COUNT = ( BITS_24_FULL_SCALE * ( 3.0F - 0.1F ) ) / 3.0F; ///< Temperature sensors max allowed ADC count. -static const U32 TEMP_SESNORS_MIN_ADC_COUNT = ( BITS_24_FULL_SCALE * ( 0.1F - 0.0F ) ) / 3.0F; ///< Temperature sensors min allowed ADC count. - // ********** private function prototypes ********** static TEMPSENSORS_EXEC_STATES_T handleExecStart( void ); @@ -333,7 +326,6 @@ initPersistentAlarm( ALARM_ID_DG_TEMPERATURE_SENSOR_OUT_OF_RANGE, TEMP_SENSORS_OUT_OF_RANGE_TIME_OUT_MS, TEMP_SENSORS_OUT_OF_RANGE_TIME_OUT_MS ); // Persistent alarm for the temperature sensors range check - initPersistentAlarm( ALARM_ID_DG_TEMPERATURE_SENSORS_ADC_FAULT, TEMP_SENSORS_OUT_OF_RANGE_TIME_OUT_MS, TEMP_SENSORS_OUT_OF_RANGE_TIME_OUT_MS ); initPersistentAlarm( ALARM_ID_DG_DIALYSATE_TEMPERATURE_SENSORS_OUT_OF_RANGE, 0, DIALYSATE_TEMP_SNSRS_OUT_OF_RANGE_TIMEOUT_MS ); // Initialize the FPGA persistent alarms @@ -771,10 +763,8 @@ *************************************************************************/ static void processADCRead( U32 sensorIndex, S32 adc ) { - U08 i; F32 temperature; F32 avgADCReads; - BOOL isADCNotValid = FALSE; U32 index = tempSensors[ sensorIndex ].adcNextIndex; S32 indexValue = tempSensors[ sensorIndex ].rawADCReads [ index ]; @@ -784,23 +774,6 @@ tempSensors[ sensorIndex ].adcRunningSum = tempSensors[ sensorIndex ].adcRunningSum - indexValue + adc; avgADCReads = tempSensors[ sensorIndex ].adcRunningSum >> SHIFT_BITS_BY_2_FOR_AVERAGING; // Calculate the average - // Check if the average ADC is within the accepted range - tempSensors[ sensorIndex ].adcErrorStatus = ( ( (U32)avgADCReads < TEMP_SESNORS_MIN_ADC_COUNT ) || - ( (U32)avgADCReads > TEMP_SENSORS_MAX_ADC_COUNT ) ? TRUE : FALSE ); - - for ( i = 0; i < NUM_OF_TEMPERATURE_SENSORS; i++ ) - { - // Loop through the temperature sensors and check the ADC range except the heater's temperature sensors. They are only - // used to display the temperature inside the heaters - if ( ( i != TEMPSENSORS_PRIMARY_HEATER_THERMO_COUPLE ) && ( i != TEMPSENSORS_TRIMMER_HEATER_THERMO_COUPLE ) && - ( i != TEMPSENSORS_PRIMARY_HEATER_COLD_JUNCTION ) && ( i != TEMPSENSORS_TRIMMER_HEATER_COLD_JUNCTION ) ) - { - isADCNotValid |= tempSensors[ sensorIndex ].adcErrorStatus; - } - } - - checkPersistentAlarm( ALARM_ID_DG_TEMPERATURE_SENSORS_ADC_FAULT, isADCNotValid, sensorIndex, avgADCReads ); - // Different sensors have different ADC to temperature conversion methods switch( sensorIndex ) { @@ -1047,17 +1020,9 @@ case TEMPSENSORS_OUTLET_REDUNDANT: case TEMPSENSORS_INLET_DIALYSATE: case TEMPSENSORS_FPGA_BOARD_SENSOR: - case TEMPSENSORS_LOAD_CELL_A1_B1: - case TEMPSENSORS_LOAD_CELL_A2_B2: - case TEMPSENSORS_INTERNAL_TRO_RTD: - case TEMPSENSORS_INTERNAL_TDI_RTD: - case TEMPSENSORS_INTERNAL_THD_RTD: - case TEMPSENSORS_INTERNAL_COND_TEMP_SENSOR: case TEMPSENSORS_BAROMETRIC_TEMP_SENSOR: - // All the temperature sensors are monitored except the heaters' temperature sensors. - // The heaters' temperature sensors are only broadcast for information + // All other temperature sensors are only broadcast for logging/dialin purposes. temperature = getTemperatureValue( sensorId ); - // Check both temperature and to be in range if ( ( ( temperature < TEMP_SENSORS_MIN_ALLOWED_DEGREE_C ) || ( temperature > tempSensors[ sensorId ].maxAllowedTemp ) ) && ( getCurrentOperationMode() != DG_MODE_INIT ) )