Index: firmware/App/Controllers/Fans.c =================================================================== diff -u -r2f2d0ccadd8a09037eb3d0dd144549b2c8c8129b -r45263215b372cd579e8e16bb8073c287c726c55d --- firmware/App/Controllers/Fans.c (.../Fans.c) (revision 2f2d0ccadd8a09037eb3d0dd144549b2c8c8129b) +++ firmware/App/Controllers/Fans.c (.../Fans.c) (revision 45263215b372cd579e8e16bb8073c287c726c55d) @@ -12,25 +12,26 @@ // ********** private definitions ********** -#define FANS_MIN_PWM_PERCENT 0.1 ///< Fans min PWM. -#define FANS_MAX_PWM_PERCENT 0.95 ///< Fans max PWM. -#define MIN_ALLOWED_AMBIENT_TEMPERATURE 20 ///< Min allowed ambient temperature. -#define MAX_ALLOWED_AMBINET_TEMPERATURE 70 ///< Max allowed ambient temperature. -#define FANS_MAX_ALLOWED_RAMP_UP_PWM_CHANGE 0.3 ///< Fans max allowed ramp up PWM change. -#define FANS_MAX_ALLOWED_RAMP_DOWN_PWM_CHANGE 0.005 ///< Fans min allowed ramp down PWM change. +#define FANS_MIN_PWM_PERCENT 0.1 ///< Fans min PWM. +#define FANS_MAX_PWM_PERCENT 0.95 ///< Fans max PWM. +#define MIN_ALLOWED_AMBIENT_TEMPERATURE 20 ///< Min allowed ambient temperature. +#define MAX_ALLOWED_AMBINET_TEMPERATURE 70 ///< Max allowed ambient temperature. +#define FANS_MAX_ALLOWED_RAMP_UP_PWM_CHANGE 0.3 ///< Fans max allowed ramp up PWM change. +#define FANS_MAX_ALLOWED_RAMP_DOWN_PWM_CHANGE 0.005 ///< Fans min allowed ramp down PWM change. -#define ONE_MINUTE_TO_MICRO_SECONDS 60000000 ///< One minute to micro seconds conversion. -#define TOGGLE_PERIOD_RESOLUTION 2.5 ///< FPGA fans toggle period resolution in micro seconds. -#define ROTATIONAL_TO_TOGGLE_PERIOD_CONVERSION_COEFF 4 ///< FPGA rotational to toggle period conversion coefficient. +#define ONE_MINUTE_TO_MICRO_SECONDS 60000000 ///< One minute to micro seconds conversion. +#define TOGGLE_PERIOD_RESOLUTION 2.5 ///< FPGA fans toggle period resolution in micro seconds. +#define ROTATIONAL_TO_TOGGLE_PERIOD_CONVERSION_COEFF 4 ///< FPGA rotational to toggle period conversion coefficient. -#define FANS_DATA_PUBLISH_INTERVAL (MS_PER_SECOND / TASK_GENERAL_INTERVAL) ///< Fans publish data time interval in counts. -#define FANS_CONTROL_INTERVAL (MS_PER_SECOND / TASK_GENERAL_INTERVAL) ///< Fans control time interval in counts. -#define FANS_ZERO_RPM_TOGGLE_PERIOD_VALUE 0xFFFF +#define FANS_DATA_PUBLISH_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Fans publish data time interval in counts. +#define FANS_CONTROL_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Fans control time interval in counts. +#define FANS_ZERO_RPM_TOGGLE_PERIOD_VALUE 0xFFFF ///< Fans zero RPM toggle period value. /// Fans self test states typedef enum fans_Self_Test { FANS_SELF_TEST_START = 0, ///< Fans self test start state + FAN_SELF_TEST_COMPLETE, ///< Fans self test complete state NUM_OF_SELF_TEST_STATES, ///< Number of fans self test } FANS_SELF_TEST_STATES_T; @@ -45,20 +46,20 @@ /// Fans status struct typedef struct { - F32 targetPWM; ///< Fan's Target PWM - F32 calculatedPWM; ///< Fan's calculated PWM from the calculations - U32 rpm[ NUM_OF_FANS_NAMES ]; ///< Fan's current speed + F32 targetPWM; ///< Fan's Target PWM + F32 calculatedPWM; ///< Fan's calculated PWM from the calculations + U32 rpm[ NUM_OF_FANS_NAMES ]; ///< Fan's current speed } FAN_STATUS_T; -static FAN_STATUS_T fansStatus; ///< Fans status -static SELF_TEST_STATUS_T fansSelfTestReslt = SELF_TEST_STATUS_IN_PROGRESS; ///< Fans self test result -static FANS_SELF_TEST_STATES_T fansSelfTestState = FANS_SELF_TEST_START; ///< Fans self test state -static FANS_EXEC_STATES_T fansExecState = FANS_EXEC_STATE_START; ///< Fans exec state -static U32 fansControlCounter = 0; ///< Fans control interval counter -static U32 fansPublishCounter = 0; ///< Fans data publish interval counter +static FAN_STATUS_T fansStatus; ///< Fans status +static SELF_TEST_STATUS_T fansSelfTestReslt = SELF_TEST_STATUS_IN_PROGRESS; ///< Fans self test result +static FANS_SELF_TEST_STATES_T fansSelfTestState = FANS_SELF_TEST_START; ///< Fans self test state +static FANS_EXEC_STATES_T fansExecState = FANS_EXEC_STATE_START; ///< Fans exec state +static U32 fansControlCounter = 0; ///< Fans control interval counter +static U32 fansPublishCounter = 0; ///< Fans data publish interval counter static const F32 slope = ( MAX_ALLOWED_AMBINET_TEMPERATURE - MIN_ALLOWED_AMBIENT_TEMPERATURE ) / - ( FANS_MAX_PWM_PERCENT - FANS_MIN_PWM_PERCENT ); ///< Temperature to PWM conversion slope + ( FANS_MAX_PWM_PERCENT - FANS_MIN_PWM_PERCENT ); ///< Temperature to PWM conversion slope /// FGPA Toggle to RPM conversion coefficient static F32 const toggle2RPMCoefficient = ( ONE_MINUTE_TO_MICRO_SECONDS * ROTATIONAL_TO_TOGGLE_PERIOD_CONVERSION_COEFF ) / TOGGLE_PERIOD_RESOLUTION; @@ -97,13 +98,29 @@ /*********************************************************************//** * @brief * The execFansSelfTest function executes the fans self test. - * @details Inputs: FILL UP - * @details Outputs: FILL UP + * @details Inputs: fansSelfTestState, fansSelfTestReslt + * @details Outputs: fansSelfTestState, fansSelfTestReslt * @return Status of self test *************************************************************************/ SELF_TEST_STATUS_T execFansSelfTest( void ) { + switch ( fansSelfTestState ) + { + case FANS_SELF_TEST_START: + break; + case FAN_SELF_TEST_COMPLETE: + // Done with POST. Do nothing + break; + + default: + // Wrong state called + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_FAN_INVALID_SELF_TEST_STATE, fansSelfTestState ); + fansSelfTestState = FAN_SELF_TEST_COMPLETE; + break; + } + + return fansSelfTestReslt; } /*********************************************************************//** @@ -314,7 +331,7 @@ switch ( fan ) { case FAN_INLET_1: - RPM = getFPGAFan1Pulse(); //TODO is this the right place? + RPM = getFPGAInletFan1Pulse(); //TODO is this the right place? break; case FAN_INLET_2: @@ -326,7 +343,7 @@ break; case FAN_OUTLET_1: - RPM = getFPGAFan2Pulse(); //TODO is this the right place? + RPM = getFPGAInletFan2Pulse(); //TODO is this the right place? break; case FAN_OUTLET_2: @@ -391,7 +408,12 @@ fansData.fansCalculatedPWM = fansStatus.calculatedPWM * 100; fansData.fansTargetPWM = fansStatus.targetPWM * 100; - //TODO fill up the speeds + fansData.fanInlet1RPM = fansStatus.rpm[ FAN_INLET_1 ]; + fansData.fanInlet2RPM = fansStatus.rpm[ FAN_INLET_2 ]; + fansData.fanInlet3RPM = fansStatus.rpm[ FAN_INLET_3 ]; + fansData.fanOutlet1RPM = fansStatus.rpm[ FAN_OUTLET_1 ]; + fansData.fanOutlet2RPM = fansStatus.rpm[ FAN_OUTLET_2 ]; + fansData.fanOutlet3RPM = fansStatus.rpm[ FAN_OUTLET_3 ]; broadcastFansData( &fansData ); @@ -403,13 +425,51 @@ * TEST SUPPORT FUNCTIONS *************************************************************************/ +/*********************************************************************//** + * @brief + * The testSetFanPublishIntervalOverride function overrides the fans data + * publish interval. + * @details Inputs: fansPublishInterval + * @details Outputs: fansPublishInterval + * @param: value : override fans data publish interval with (in ms) + * @return TRUE if override successful, FALSE if not + *************************************************************************/ BOOL testSetFanPublishIntervalOverride( U32 value ) { + BOOL result = FALSE; + if ( TRUE == isTestingActivated() ) + { + U32 intvl = value / TASK_GENERAL_INTERVAL; + + result = TRUE; + fansPublishInterval.ovData = intvl; + fansPublishInterval.override = OVERRIDE_KEY; + } + + return result; } + +/*********************************************************************//** + * @brief + * The testResetFanPublishIntervalOverride function resets the override + * of the fans data publish interval. + * @details Inputs: fansPublishInterval + * @details Outputs: fansPublishInterval + * @return TRUE if override reset successful, FALSE if not + ************************************************************************/ BOOL testResetFanPublishIntervalOverride( void ) { + BOOL result = FALSE; + if ( TRUE == isTestingActivated() ) + { + result = TRUE; + fansPublishInterval.override = OVERRIDE_RESET; + fansPublishInterval.ovData = fansPublishInterval.ovInitData; + } + + return result; } - +/**@}*/ Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -rd3671cad1447db7ad496ad6282324ef7570c5625 -r45263215b372cd579e8e16bb8073c287c726c55d --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision d3671cad1447db7ad496ad6282324ef7570c5625) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 45263215b372cd579e8e16bb8073c287c726c55d) @@ -707,6 +707,14 @@ return result; } +/*********************************************************************//** + * @brief + * The getTargetROPumpPressure function gets the current target RO pump + * pressure. + * @details Inputs: targetROPumpPressure + * @details Outputs: targetROPumpPressure + * @return the current target RO targetROPumpPressure in psi. + *************************************************************************/ F32 getTargetROPumpPressure( void ) { F32 result = targetROPumpPressure.data; Index: firmware/App/Controllers/Thermistors.c =================================================================== diff -u -r2f2d0ccadd8a09037eb3d0dd144549b2c8c8129b -r45263215b372cd579e8e16bb8073c287c726c55d --- firmware/App/Controllers/Thermistors.c (.../Thermistors.c) (revision 2f2d0ccadd8a09037eb3d0dd144549b2c8c8129b) +++ firmware/App/Controllers/Thermistors.c (.../Thermistors.c) (revision 45263215b372cd579e8e16bb8073c287c726c55d) @@ -15,13 +15,17 @@ // ********** private definitions ********** #define THERMISTORS_DATA_PUBLISH_INTERVAL (MS_PER_SECOND / TASK_GENERAL_INTERVAL) ///< Thermistors publish data time interval. -#define THERMISTORS_ADC_READ_INTERVAL (MS_PER_SECOND / (2 * TASK_GENERAL_INTERVAL)) ///< Thermistors ADC read time interval. -#define ADC_FPGA_READ_DELAY_COUNT 1 ///< FGPA read delay upon startup. -#define ONBOARD_THERMISTOR_SOURCE_VOLTAGE 3 ///< Onboard thermistor source voltage. -#define ONBOARD_THERMISTOR_REFERENCE_RESISTOR 10 ///< Onboard thermistor reference resistor. -#define ONBOARD_THERMISTOR_BETA_VALUE 3380 ///< Onboard thermistor beta value. -#define ONBOARD_THERMISTOR_REFERENCE_TEMPERATURE 298 ///< Onboard thermistor reference temperature. -#define TWELVE_BIT_RESOLUTION 4096 ///< 12 bit resolution conversion. +#define THERMISTORS_ADC_READ_INTERVAL (MS_PER_SECOND / (2 * TASK_GENERAL_INTERVAL)) ///< Thermistors ADC read time interval. +#define ADC_FPGA_READ_DELAY_COUNT 1 ///< FGPA read delay upon startup. +#define ONBOARD_THERMISTOR_SOURCE_VOLTAGE 3 ///< Onboard thermistor source voltage. +#define ONBOARD_THERMISTOR_REFERENCE_RESISTOR 10 ///< Onboard thermistor reference resistor. +#define ONBOARD_THERMISTOR_BETA_VALUE 3380 ///< Onboard thermistor beta value. +#define ONBOARD_THERMISTOR_REFERENCE_TEMPERATURE 298 ///< Onboard thermistor reference temperature. +#define TWELVE_BIT_RESOLUTION 4096 ///< 12 bit resolution conversion. +#define CELSIUS_TO_KELVIN_CONVERSION 273.15 ///< Celsius to Kelvin temperature conversion. +#define ADC_TEMP_SENSORS_CONVERSION_CONST 272.5 ///< ADC temperature sensors conversion constant. +#define MIN_ALLOWED_TEMPERATURE 10 ///< Thermistors/sensors minimum allowed temperature reading. +#define MAX_ALLOWED_TEMPERATURE 70 ///< Thermistors/sensors maximum allowed temperature reading. /// Thermistors self test states typedef enum thermistors_Self_Test_States @@ -47,26 +51,27 @@ OVERRIDE_F32_T temperatureValue; ///< Thermistor temperature value } THERMISTOR_T; - -static SELF_TEST_STATUS_T thermistorsSelfTestReslt = SELF_TEST_STATUS_IN_PROGRESS; ///< Thermistors self test result -static THERMISTORS_SELF_TEST_STATES_T thermistorsSelfTestState = THERMISTORS_SELF_TEST_START; ///< Thermistors self test state -static THERMISTORS_EXEC_STATES_T thermistorsExecState = THERMISTORS_EXEC_STATE_START; ///< Thermistors exec state -static THERMISTOR_T thermistorsStatus[ NUM_OF_THERMISTORS ]; ///< Thermistors array - +static SELF_TEST_STATUS_T thermistorsSelfTestReslt = SELF_TEST_STATUS_IN_PROGRESS; ///< Thermistors self test result +static THERMISTORS_SELF_TEST_STATES_T thermistorsSelfTestState = THERMISTORS_SELF_TEST_START; ///< Thermistors self test state +static THERMISTORS_EXEC_STATES_T thermistorsExecState = THERMISTORS_EXEC_STATE_START; ///< Thermistors exec state +static THERMISTOR_T thermistorsStatus[ NUM_OF_THERMISTORS ]; ///< Thermistors array static OVERRIDE_U32_T thermistorsPublishInterval = { THERMISTORS_DATA_PUBLISH_INTERVAL, - THERMISTORS_DATA_PUBLISH_INTERVAL, 0, 0 }; ///< Thermistors publish time interval override + THERMISTORS_DATA_PUBLISH_INTERVAL, 0, 0 }; ///< Thermistors publish time interval override +static U32 dataPublishCounter; ///< Thermistors data publish timer counter +static U32 adcReadCounter; ///< Thermistors ADC read counter -static U32 dataPublishCounter; ///< Thermistors data publish timer counter -static U32 adcReadCounter; ///< Thermistors ADC read counter +static const F32 fpgaBoardTempSensorConvCoeff = 503.975 / TWELVE_BIT_RESOLUTION; ///< FPGA board temperature sensor conversion coefficient +static const F32 adcTempSensorsConversionCoeff1 = 1 / 13584; ///< ADC temperature sensors conversion coefficient 1 +static const F32 adcTempSensorsConversionCoeff2 = 0x800000 / 13584; ///< ADC temperature sensors conversion coefficient 2 // ********** private function prototypes ********** static THERMISTORS_EXEC_STATES_T handleExecStart( void ); static THERMISTORS_EXEC_STATES_T handleExecGetADCValues( void ); -static void convertADCtoTemperature( THERMISTORS_TEMP_SENSORS_T thermistor ); -static F32 calcualteOnBoardThemristorTemperature( U32 adcValue ); - +static void monitorThermistors( void ); +static void convertADCtoTemperature( void ); +static F32 calculateOnBoardThemristorTemperature( U32 adcValue ); static void publishThermistorsData( void ); static U32 getPublishThermistorsDataInterval( void ); @@ -211,65 +216,105 @@ *************************************************************************/ static THERMISTORS_EXEC_STATES_T handleExecGetADCValues( void ) { - THERMISTORS_TEMP_SENSORS_T thermistor; - THERMISTORS_EXEC_STATES_T state = THERMISTORS_EXEC_STATE_GET_ADC_VALUES; // If time has elapsed to read the ADCs, read them all if ( ++adcReadCounter >= THERMISTORS_ADC_READ_INTERVAL ) { - thermistorsStatus[ THERMISTOR_ONBOARD_NTC ].rawADCRead = getIntADCReading( INT_ADC_BOARD_THERMISTOR ); + // Get all the raw readings in ADC + thermistorsStatus[ THERMISTOR_ONBOARD_NTC ].rawADCRead = getIntADCReading( INT_ADC_BOARD_THERMISTOR ); + thermistorsStatus[ TEMPSENSOR_FPGA_SENSOR ].rawADCRead = getFPGABoardTemp(); + thermistorsStatus[ TEMPSENSOR_LOAD_CELL_A1 ].rawADCRead = getFPGALoadCellsA1B1Temp(); + thermistorsStatus[ TEMPSENSOR_LOAD_CELL_A2 ].rawADCRead = getFPGALoadCellsA2B2Temp(); + thermistorsStatus[ TEMPSENSOR_THDO_RTD ].rawADCRead = getFPGATHDoInternalTemp(); + thermistorsStatus[ TEMPSENSOR_TDI_RTD ].rawADCRead = getFPGATDiInternalTemp(); + thermistorsStatus[ TEMPSENSOR_CONDUCTIVITY ].rawADCRead = getFPGAConductivitySnsrInternalTemp(); // Zero the counter for the next round of reading adcReadCounter = 0; - // Loop through the list and update the temperature values - for ( thermistor = THERMISTOR_ONBOARD_NTC; thermistor < NUM_OF_THERMISTORS; thermistor++ ) - { - convertADCtoTemperature( thermistor ); - } + // Convert all the latest ADCs to temperature + convertADCtoTemperature(); + + // Monitor the values for a gross range check + monitorThermistors(); } return state; } /*********************************************************************//** * @brief + * The monitorThermistors function monitors the thermistors and sensors + * for gross temperature range check. + * @details Inputs: none + * @details Outputs: none + * @return none + *************************************************************************/ +static void monitorThermistors( void ) +{ + THERMISTORS_TEMP_SENSORS_T thermistor; + F32 temperature; + + for ( thermistor = THERMISTOR_ONBOARD_NTC; thermistor < NUM_OF_THERMISTORS; thermistor++ ) + { + temperature = getThermistorTemperatureValue( thermistor ); + + // If the thermisotrs and sensors read temperature out of range, raise an alarm + if ( temperature < MIN_ALLOWED_TEMPERATURE || temperature >= MAX_ALLOWED_TEMPERATURE ) + { + SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DG_THERMISOTRS_TEMPERATURE_OUT_OF_RANGE, thermistor, temperature ); + } + } +} + +/*********************************************************************//** + * @brief * The convertADCtoTemperature function converts the ADC values of different * thermistors and temperature sensors to temperature value. * @details Inputs: thermistorsStatus * @details Outputs: thermistorsStatus * @param thermistor (also covers the temperature sensors) to convert its value * @return none *************************************************************************/ -static void convertADCtoTemperature( THERMISTORS_TEMP_SENSORS_T thermistor ) +static void convertADCtoTemperature( void ) { + THERMISTORS_TEMP_SENSORS_T thermistor; F32 temperature; + U32 rawADC; - // Each of the sensors/thermistors have different equations to convert ADC read to temperature - switch ( thermistor ) + // Loop through the list and update the temperature values + for ( thermistor = THERMISTOR_ONBOARD_NTC; thermistor < NUM_OF_THERMISTORS; thermistor++ ) { - case THERMISTOR_ONBOARD_NTC: - temperature = calcualteOnBoardThemristorTemperature( thermistorsStatus[ THERMISTOR_ONBOARD_NTC ].rawADCRead ); - thermistorsStatus[ THERMISTOR_ONBOARD_NTC ].temperatureValue.data = temperature; - break; + rawADC = thermistorsStatus[ thermistor ].rawADCRead; - case TEMPSENSOR_FPGA_SENSOR: - //TODO do stuff - break; + // Each of the sensors/thermistors have different equations to convert ADC read to temperature + switch ( thermistor ) + { + case THERMISTOR_ONBOARD_NTC: + temperature = calculateOnBoardThemristorTemperature( rawADC ); + thermistorsStatus[ THERMISTOR_ONBOARD_NTC ].temperatureValue.data = temperature; + break; - case TEMPSENSOR_LOAD_CELL_A1: - case TEMPSENSOR_LOAD_CELL_A2: - case TEMPSENSOR_THDO_RTD: - case TEMPSENSOR_TDI_RTD: - case THERMISTOR_CONDUCTIVITY: + case TEMPSENSOR_FPGA_SENSOR: + temperature = ( rawADC * fpgaBoardTempSensorConvCoeff ) - CELSIUS_TO_KELVIN_CONVERSION; + thermistorsStatus[ TEMPSENSOR_FPGA_SENSOR ].temperatureValue.data = temperature; + break; - // TODO fill up the case - break; + // All these sensors have the same conversion procedure + case TEMPSENSOR_LOAD_CELL_A1: + case TEMPSENSOR_LOAD_CELL_A2: + case TEMPSENSOR_THDO_RTD: + case TEMPSENSOR_TDI_RTD: + case TEMPSENSOR_CONDUCTIVITY: + temperature = ( ( rawADC * adcTempSensorsConversionCoeff1 ) - adcTempSensorsConversionCoeff2 ) - ADC_TEMP_SENSORS_CONVERSION_CONST; + thermistorsStatus[ thermistor ].temperatureValue.data = temperature; + break; - default: - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_INVALID_THERMISTOR_SELECTED, thermistor ); - break; + default: + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_INVALID_THERMISTOR_SELECTED, thermistor ); + break; + } } } @@ -282,7 +327,7 @@ * @param ADC value to be converted into temperature in C * @return calculated temperature in C *************************************************************************/ -static F32 calcualteOnBoardThemristorTemperature( U32 adcValue ) +static F32 calculateOnBoardThemristorTemperature( U32 adcValue ) { //TODO add comments F32 thermistorVoltage = ( adcValue * ONBOARD_THERMISTOR_SOURCE_VOLTAGE ) / TWELVE_BIT_RESOLUTION; @@ -328,11 +373,19 @@ if ( ++dataPublishCounter > getPublishThermistorsDataInterval() ) { THERMISTORS_DATA_T sensorsData; - //TODO add the rest too - sensorsData.OnboardThermistor = getThermistorTemperatureValue( THERMISTOR_ONBOARD_NTC ); - broadcastThermistorsData( &sensorsData ); + // Get all the sensors/thermistors values for publication + sensorsData.onboardThermistor = getThermistorTemperatureValue( THERMISTOR_ONBOARD_NTC ); + sensorsData.fpgaBoardTempSensor = getFPGABoardTemp(); + sensorsData.loadCellA1TempSensor = getFPGALoadCellsA1B1Temp(); + sensorsData.loadCellA2TempSensor = getFPGALoadCellsA2B2Temp(); + sensorsData.rtdInternalTempSensor = getFPGATHDoInternalTemp(); + sensorsData.rtdTDiInternalTempSensor = getFPGATDiInternalTemp(); + sensorsData.conductivityTempSensor = getFPGAConductivitySnsrInternalTemp(); + // Broadcast the thermistors data + broadcastThermistorsData( &sensorsData ); + // Reset the counter dataPublishCounter = 0; } } @@ -341,24 +394,108 @@ * TEST SUPPORT FUNCTIONS *************************************************************************/ -BOOL testSetMeasuredThermistorOverride( U32 thermistor, F32 temperature ) +/*********************************************************************//** + * @brief + * The testSetThermistorPublishIntervalOverride function overrides the + * thermistors data publish interval. + * @details Inputs: thermistorsPublishInterval + * @details Outputs: thermistorsPublishInterval + * @param value which is override value for the thermistors data publish + * interval + * @return TRUE if override successful, FALSE if not + *************************************************************************/ +BOOL testSetThermistorPublishIntervalOverride( U32 value ) { + BOOL result = FALSE; + if ( TRUE == isTestingActivated() ) + { + U32 intvl = value / TASK_GENERAL_INTERVAL; + + result = TRUE; + thermistorsPublishInterval.ovData = intvl; + thermistorsPublishInterval.override = OVERRIDE_KEY; + } + + return result; } -BOOL testResetMeasuredThermistorOverride( U32 thermistor ) +/*********************************************************************//** + * @brief + * The testResetThermistorPublishIntervalOverride function resets the override + * of the thermistors publish interval. + * @details Inputs: thermistorsPublishInterval + * @details Outputs: thermistorsPublishInterval + * @return TRUE if override reset successful, FALSE if not + *************************************************************************/ +BOOL testResetThermistorPublishIntervalOverride( void ) { + BOOL result = FALSE; + if ( TRUE == isTestingActivated() ) + { + result = TRUE; + thermistorsPublishInterval.override = OVERRIDE_RESET; + thermistorsPublishInterval.ovData = thermistorsPublishInterval.ovInitData; + } + + return result; } -BOOL testSetThermistorPublishIntervalOverride( U32 value ) +/*********************************************************************//** + * @brief + * The testSetMeasuredThermistorOverride function overrides the value of + * a thermistor. + * @details Inputs: thermistorsStatus + * @details Outputs: thermistorsStatus + * @param thermistor which its value is overridden + * @param temperature value to override + * @return TRUE if override successful, FALSE if not + *************************************************************************/ +BOOL testSetMeasuredThermistorOverride( U32 thermistor, F32 temperature ) { + BOOL result = FALSE; + if ( thermistor < NUM_OF_THERMISTORS && isTestingActivated() ) + { + // There is a temperature range that the thermistors can be set to, otherwise, the driver + // will throw an alarm. Also, the fans driver depends on these values to continuously control the fans + if ( temperature >= MIN_ALLOWED_TEMPERATURE && temperature < MAX_ALLOWED_TEMPERATURE ) + { + result = TRUE; + thermistorsStatus[ thermistor ].temperatureValue.ovData = temperature; + thermistorsStatus[ thermistor ].temperatureValue.override = OVERRIDE_KEY; + } + } + + return result; } -BOOL testResetThermistorPublishIntervalOverride( void ) +/*********************************************************************//** + * @brief + * The testResetMeasuredThermistorOverride function resets the override + * value of a thermistor. + * @details Inputs: thermistorsStatus + * @details Outputs: thermistorsStatus + * @param thermistor which its value is overridden + * @return TRUE if override successful, FALSE if not + *************************************************************************/ +BOOL testResetMeasuredThermistorOverride( U32 thermistor ) { + BOOL result = FALSE; -} + if ( thermistor < NUM_OF_THERMISTORS ) + { + if ( isTestingActivated() ) + { + result = TRUE; + thermistorsStatus[ thermistor ].temperatureValue.override = OVERRIDE_RESET; + thermistorsStatus[ thermistor ].temperatureValue.ovData = thermistorsStatus[ thermistor ].temperatureValue.ovInitData; + } + } + return result; +} + +/**@}*/ Index: firmware/App/Controllers/Thermistors.h =================================================================== diff -u -r04db56ac0f515f35b7f236d607bfb6f7585f55fb -r45263215b372cd579e8e16bb8073c287c726c55d --- firmware/App/Controllers/Thermistors.h (.../Thermistors.h) (revision 04db56ac0f515f35b7f236d607bfb6f7585f55fb) +++ firmware/App/Controllers/Thermistors.h (.../Thermistors.h) (revision 45263215b372cd579e8e16bb8073c287c726c55d) @@ -25,15 +25,20 @@ TEMPSENSOR_LOAD_CELL_A2, ///< Load cell A2 temperature sensor TEMPSENSOR_THDO_RTD, ///< THDo RTD temperature sensor TEMPSENSOR_TDI_RTD, ///< TDi RTD temperature sensor - THERMISTOR_CONDUCTIVITY, ///< Conductivity sensor thermistor + TEMPSENSOR_CONDUCTIVITY, ///< Conductivity sensor temperature sensor NUM_OF_THERMISTORS, ///< Number of thermistors } THERMISTORS_TEMP_SENSORS_T; /// Thermistors/temperature sensors data publish struct typedef struct { - F32 OnboardThermistor; ///< Onboard thermistor data - F32 FPGABoardSensor; ///< FPGA board temperature sensor data + F32 onboardThermistor; ///< Onboard thermistor data + F32 fpgaBoardTempSensor; ///< FPGA board temperature sensor data + F32 loadCellA1TempSensor; ///< Load cell A1 temperature sensor + F32 loadCellA2TempSensor; ///< Load cell A2 temperature sensor + F32 rtdInternalTempSensor; ///< RTD internal temperature sensor + F32 rtdTDiInternalTempSensor; ///< RTD TDi internal temperature sensor + F32 conductivityTempSensor; ///< Conductivity temperature sensor } THERMISTORS_DATA_T; // ********** public function prototypes ********** Index: firmware/App/Controllers/UVReactors.c =================================================================== diff -u -r04db56ac0f515f35b7f236d607bfb6f7585f55fb -r45263215b372cd579e8e16bb8073c287c726c55d --- firmware/App/Controllers/UVReactors.c (.../UVReactors.c) (revision 04db56ac0f515f35b7f236d607bfb6f7585f55fb) +++ firmware/App/Controllers/UVReactors.c (.../UVReactors.c) (revision 45263215b372cd579e8e16bb8073c287c726c55d) @@ -16,7 +16,7 @@ #define INLET_UV_REACTOR_ENABLE_PIN 0 ///< Inlet UV reactor GPIO pin number (enable pin) #define OUTLET_UV_REACTOR_ENABLE_PIN 1 ///< Outlet UV reactor GPIO pin number (enable Pin) -#define INLET_UV_REACTOR_INDICATION_PIN 24 ///< Inlet UV reactor N2HET1 pin number (health check) +#define INLET_UV_REACTOR_INDICATION_PIN 26 ///< Inlet UV reactor N2HET1 pin number (health check) #define OUTLET_UV_REACTOR_INDICATION_PIN 11 ///< Outlet UV reactor N2HET1 pin number (health check) #define UV_REACTORS_DATA_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< UV reactors data publication time interval /// Self test wait time after enabling the reactors and before checking for their health in ms Index: firmware/App/Modes/ModeHeatDisinfect.c =================================================================== diff -u -rd3671cad1447db7ad496ad6282324ef7570c5625 -r45263215b372cd579e8e16bb8073c287c726c55d --- firmware/App/Modes/ModeHeatDisinfect.c (.../ModeHeatDisinfect.c) (revision d3671cad1447db7ad496ad6282324ef7570c5625) +++ firmware/App/Modes/ModeHeatDisinfect.c (.../ModeHeatDisinfect.c) (revision 45263215b372cd579e8e16bb8073c287c726c55d) @@ -64,7 +64,7 @@ #define DRAIN_PUMP_TARGET_DELTA_PRESSURE 0.0 ///< Drain pump target delta pressure #define DRAIN_PUMP_EVACUATE_FLUID_TARGET_RPM 2800U ///< Drain pump target RPM during evacuating the fluid path #define DRAIN_PUMP_DISINFECT_DRAIN_PATH_TARGET_RPM 1500U ///< Drain pump target RPM during heat disinfection -#define RO_PUMP_TARGET_FILL_FLOW_RATE_LPM 0.9 ///< RO pump target fill flow rate +#define RO_PUMP_TARGET_FILL_FLOW_RATE_LPM 0.8 ///< RO pump target fill flow rate #define RO_PUMP_TARGET_FILL_MAX_PRESSURE 140 ///< RO pump max allowed pressure during fillin the reservoirs #define RO_PUMP_TARGET_HEAT_UP_FLOW_RATE_LPM 0.5 ///< RO pump target flow rate during heating up the fluid #define RO_PUMP_TARGET_HEAT_UP_MAX_PRESSURE 30 ///< RO pump max allowed pressure during heating up water Index: firmware/App/Services/FPGA.c =================================================================== diff -u -r2f2d0ccadd8a09037eb3d0dd144549b2c8c8129b -r45263215b372cd579e8e16bb8073c287c726c55d --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision 2f2d0ccadd8a09037eb3d0dd144549b2c8c8129b) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision 45263215b372cd579e8e16bb8073c287c726c55d) @@ -1193,7 +1193,7 @@ * @brief * The getFPGATDiTemp function gets the latest dialysate inlet temperature reading in ADC. * @details - * Inputs : fpgaSensorReadings.fpgaTDiTemp + * Inputs : fpgaSensorReadings.fpgaTDi * Outputs : none * @return last primary heater outlet temperature reading *************************************************************************/ @@ -1500,26 +1500,148 @@ /*********************************************************************//** * @brief - * The getFPGAFan1Pulse function gets fan 1 pulse value. + * The getFPGAFan1Pulse function gets inlet fan 1 pulse value. * @details Inputs: fpgaSensorReadings * @details Outputs: none - * @return fan 1 pulse value + * @return inlet fan 1 pulse value *************************************************************************/ -U16 getFPGAFan1Pulse( void ) +U16 getFPGAInletFan1Pulse( void ) { return fpgaSensorReadings.fpgaFan1Pulse; } /*********************************************************************//** * @brief - * The getFPGAFan2Pulse function gets fan 2 pulse value. + * The getFPGAFan2Pulse function gets inlet fan 2 pulse value. * @details Inputs: fpgaSensorReadings * @details Outputs: none - * @return fan 2 pulse value + * @return inlet fan 2 pulse value *************************************************************************/ -U16 getFPGAFan2Pulse( void ) +U16 getFPGAInletFan2Pulse( void ) { return fpgaSensorReadings.fpgaFan2Pulse; } +/*********************************************************************//** + * @brief + * The getFPGAInletFan3Pulse function gets inlet fan 3 pulse value. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return inlet fan 3 pulse value + *************************************************************************/ +U16 getFPGAInletFan3Pulse( void ) +{ + return 0; +} + +/*********************************************************************//** + * @brief + * The getFPGAOutletFan1Pulse function gets outlet fan 1 pulse value. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return outlet fan 1 pulse value + *************************************************************************/ +U16 getFPGAOutletFan1Pulse( void ) +{ + return 0; +} + +/*********************************************************************//** + * @brief + * The getFPGAOutletFan2Pulse function gets outlet fan 2 pulse value. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return outlet fan 2 pulse value + *************************************************************************/ +U16 getFPGAOutletFan2Pulse( void ) +{ + return 0; +} + +/*********************************************************************//** + * @brief + * The getFPGAOutletFan3Pulse function gets outlet fan 3 pulse value. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return outlet fan 3 pulse value + *************************************************************************/ +U16 getFPGAOutletFan3Pulse( void ) +{ + return 0; +} + +/*********************************************************************//** + * @brief + * The getFPGABoardTemp function gets FPGA board temperature reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return FPGA board temperature reading in ADC counts + *************************************************************************/ +U32 getFPGABoardTemp( void ) +{ + // TODO add the FPGA board temperature sensor register + return 0; +} + +/*********************************************************************//** + * @brief + * The getFPGAA1B1Temp function gets load cells A1/B1 temperature reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return load cells A1/B1 temperature reading in ADC counts + *************************************************************************/ +U32 getFPGALoadCellsA1B1Temp( void ) +{ + return fpgaSensorReadings.fpgaADC1Temp; +} + +/*********************************************************************//** + * @brief + * The getFPGAA1B1Temp function gets load cells A2/B2 temperature reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return load cells A2/B2 temperature reading in ADC counts + *************************************************************************/ +U32 getFPGALoadCellsA2B2Temp( void ) +{ + return fpgaSensorReadings.fpgaADC2Temp; +} + +/*********************************************************************//** + * @brief + * The getFPGATHDoInternalTemp function gets THDo internal temperature reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return THDo internal temperature reading in ADC counts + *************************************************************************/ +U32 getFPGATHDoInternalTemp( void ) +{ + return fpgaSensorReadings.fpgaTHDoTemp; +} + +/*********************************************************************//** + * @brief + * The getFPGATDiInternalTemp function gets TDi internal temperature reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return TDi internal temperature reading in ADC counts + *************************************************************************/ +U32 getFPGATDiInternalTemp( void ) +{ + return fpgaSensorReadings.fpgaTDiTemp; +} + +/*********************************************************************//** + * @brief + * The getFPGAConductivitySnsrInternalTemp function gets conductivity sensor + * internal temperature reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return conductivity sensor temperature reading in ADC counts + *************************************************************************/ +U32 getFPGAConductivitySnsrInternalTemp( void ) +{ + return fpgaSensorReadings.fpgaRTDTemp; +} + /**@}*/ Index: firmware/App/Services/FPGA.h =================================================================== diff -u -r2f2d0ccadd8a09037eb3d0dd144549b2c8c8129b -r45263215b372cd579e8e16bb8073c287c726c55d --- firmware/App/Services/FPGA.h (.../FPGA.h) (revision 2f2d0ccadd8a09037eb3d0dd144549b2c8c8129b) +++ firmware/App/Services/FPGA.h (.../FPGA.h) (revision 45263215b372cd579e8e16bb8073c287c726c55d) @@ -100,9 +100,20 @@ void getFPGAAccelMaxes( S16 *xm, S16*ym, S16*zm ); void getFPGAAccelStatus( U16 *cnt, U16 *accelFPGAFaultReg ); -U16 getFPGAFan1Pulse( void ); -U16 getFPGAFan2Pulse( void ); +U16 getFPGAInletFan1Pulse( void ); //TODO change these functions' names to inlet1, inlet2 once all 6 fans are implemented +U16 getFPGAInletFan2Pulse( void ); //TODO change these functions' names to inlet1, inlet2 once all 6 fans are implemented +U16 getFPGAInletFan3Pulse( void ); +U16 getFPGAOutletFan1Pulse( void ); +U16 getFPGAOutletFan2Pulse( void ); +U16 getFPGAOutletFan3Pulse( void ); +U32 getFPGABoardTemp( void ); //TODO add the FPGA board temperature sensor +U32 getFPGALoadCellsA1B1Temp( void ); +U32 getFPGALoadCellsA2B2Temp( void ); +U32 getFPGATHDoInternalTemp( void ); +U32 getFPGATDiInternalTemp( void ); +U32 getFPGAConductivitySnsrInternalTemp( void ); + /**@}*/ #endif Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r2f2d0ccadd8a09037eb3d0dd144549b2c8c8129b -r45263215b372cd579e8e16bb8073c287c726c55d --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 2f2d0ccadd8a09037eb3d0dd144549b2c8c8129b) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 45263215b372cd579e8e16bb8073c287c726c55d) @@ -2211,4 +2211,36 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } +/*********************************************************************//** +* @brief +* The handleFansDataPublishIntervalOverride function handles a request +* to override the publish interval of the fans data +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*************************************************************************/ +void handleFansDataPublishIntervalOverride( MESSAGE_T * message ) +{ + TEST_OVERRIDE_PAYLOAD_T payload; + BOOL result = FALSE; + + // verify payload length + if ( sizeof(TEST_OVERRIDE_PAYLOAD_T) == message->hdr.payloadLen ) + { + memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_PAYLOAD_T) ); + if ( FALSE == payload.reset ) + { + result = testSetFanPublishIntervalOverride( payload.state.u32 ); + } + else + { + result = testResetFanPublishIntervalOverride(); + } + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + /**@}*/ Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -r2f2d0ccadd8a09037eb3d0dd144549b2c8c8129b -r45263215b372cd579e8e16bb8073c287c726c55d --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 2f2d0ccadd8a09037eb3d0dd144549b2c8c8129b) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 45263215b372cd579e8e16bb8073c287c726c55d) @@ -251,6 +251,9 @@ //MSG_ID_UV_REACTORS_DATA_PUBLISH_INTERVAL_OVERRIDE void handleUVReactorsDataPunlishIntervalOverride( MESSAGE_T *message ); +// MSG_ID_DG_FANS_DATA_PUBLISH_OVERRIDE +void handleFansDataPublishIntervalOverride( MESSAGE_T * message ); + /**@}*/ #endif Index: firmware/App/Tasks/TaskGeneral.c =================================================================== diff -u -r54f45c387430e440ab4607451fc84dea61f273f1 -r45263215b372cd579e8e16bb8073c287c726c55d --- firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision 54f45c387430e440ab4607451fc84dea61f273f1) +++ firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision 45263215b372cd579e8e16bb8073c287c726c55d) @@ -18,14 +18,16 @@ #include "gio.h" #include "lin.h" -#include "DrainPump.h" +#include "DrainPump.h" +#include "Fans.h" #include "Heaters.h" #include "OperationModes.h" #include "Reservoirs.h" #include "ROPump.h" #include "SystemComm.h" #include "SystemCommMessages.h" -#include "TaskGeneral.h" +#include "TaskGeneral.h" +#include "Thermistors.h" #include "WatchdogMgmt.h" /** @@ -56,31 +58,46 @@ // SET_TASK_ON(); // TODO - uncomment and define TASK_TIMING_OUTPUT_ENABLED to monitor this tasks timing #endif + /* Order of exec functions + * 1. Comm Rx + * 2. Monitors + * 3. Op modes + * 4. Controllers + * 5. Comm Tx + * */ + // check in with watchdog manager checkInWithWatchdogMgmt( TASK_GENERAL ); // do this first to keep timing consistent with watchdog management // manage data received from other sub-systems - execSystemCommRx(); + execSystemCommRx(); + + // Monitor thermistors state machine + execThermistors(); + + // run operation mode state machine + execOperationModes(); + + // manage time-based reservoir tasks + execReservoirs(); + + // manage RO pump + execROPumpController(); + + // manage drain pump + execDrainPumpController(); + + // Manage fans controller + execFans(); - // manage RO pump - execROPumpController(); - - // manage drain pump - execDrainPumpController(); - - // manage time-based reservoir tasks - execReservoirs(); - #ifndef DISABLE_HEATERS_AND_TEMPS // Primary heaters state machine execPrimaryHeaters(); // Trimmer heater state machine execTrimmerHeater(); #endif - // run operation mode state machine - execOperationModes(); - + // manage data to be transmitted to other sub-systems execSystemCommTx(); Index: firmware/DG.dil =================================================================== diff -u -raa36ab1ed13d099286cedcbd066f7dce11146d13 -r45263215b372cd579e8e16bb8073c287c726c55d --- firmware/DG.dil (.../DG.dil) (revision aa36ab1ed13d099286cedcbd066f7dce11146d13) +++ firmware/DG.dil (.../DG.dil) (revision 45263215b372cd579e8e16bb8073c287c726c55d) @@ -1,4 +1,4 @@ -# RM46L852PGE 10/22/20 16:10:53 +# RM46L852PGE 11/07/20 10:11:00 # ARCH=RM46L852PGE # @@ -6171,7 +6171,7 @@ DRIVER.HET.VAR.HET2_PWM1_DUTY.VALUE=50 DRIVER.HET.VAR.HET1_PWM7_POLARITY.VALUE=3 DRIVER.HET.VAR.HET1_PWM3_ENA.VALUE=0 -DRIVER.HET.VAR.HET1_BIT24_HRSHARE.VALUE=0x00001000 +DRIVER.HET.VAR.HET1_BIT24_HRSHARE.VALUE=0x00000000 DRIVER.HET.VAR.HET1_BIT16_HRSHARE.VALUE=0x00000000 DRIVER.HET.VAR.HET1_BIT10_PULDIS.VALUE=0x00000000 DRIVER.HET.VAR.HET2_PWM5_PIN_SELECT.VALUE=17 @@ -6472,7 +6472,7 @@ DRIVER.HET.VAR.HET1_EDGE5_EVENT.VALUE=1 DRIVER.HET.VAR.HET1_EDGE1_BOTH.VALUE=0 DRIVER.HET.VAR.HET1_PWM5_PERIOD_LVL.VALUE=0x00000000 -DRIVER.HET.VAR.HET1_BIT24_DIR.VALUE=0x01000000 +DRIVER.HET.VAR.HET1_BIT24_DIR.VALUE=0x00000000 DRIVER.HET.VAR.HET1_BIT16_DIR.VALUE=0x00000000 DRIVER.HET.VAR.HET2_PWM1_POLARITY.VALUE=3 DRIVER.HET.VAR.HET2_BIT18_ANDSHARE.VALUE=0x00000000 @@ -6552,7 +6552,7 @@ DRIVER.HET.VAR.HET2_EDGE1_LVL.VALUE=0x00000000 DRIVER.HET.VAR.HET2_PWM7_PERIOD_LVL.VALUE=0x00000000 DRIVER.HET.VAR.HET1_EDGE2_BOTH.VALUE=0 -DRIVER.HET.VAR.HET1_BIT26_DIR.VALUE=0x00000000 +DRIVER.HET.VAR.HET1_BIT26_DIR.VALUE=0x04000000 DRIVER.HET.VAR.HET1_BIT18_DIR.VALUE=0x00000000 DRIVER.HET.VAR.HET2_PWM1_DUTY_INTENA.VALUE=0x00000000 DRIVER.HET.VAR.HET2_BIT16_XORSHARE.VALUE=0x00000000 Index: firmware/include/het.h =================================================================== diff -u -raa36ab1ed13d099286cedcbd066f7dce11146d13 -r45263215b372cd579e8e16bb8073c287c726c55d --- firmware/include/het.h (.../het.h) (revision aa36ab1ed13d099286cedcbd066f7dce11146d13) +++ firmware/include/het.h (.../het.h) (revision 45263215b372cd579e8e16bb8073c287c726c55d) @@ -337,9 +337,9 @@ | (uint32)0x00000000U \ | (uint32)0x10000000U \ | (uint32)0x00000000U \ + | (uint32)0x04000000U \ | (uint32)0x00000000U \ | (uint32)0x00000000U \ - | (uint32)0x01000000U \ | (uint32)0x00000000U \ | (uint32)0x00400000U \ | (uint32)0x00000000U \ @@ -467,7 +467,6 @@ #define HET1_HRSH_CONFIGVALUE ((uint32)0x00000000U \ | (uint32)0x00000000U \ | (uint32)0x00000000U \ - | (uint32)0x00001000U \ | (uint32)0x00000000U \ | (uint32)0x00000000U \ | (uint32)0x00000000U \ @@ -476,6 +475,7 @@ | (uint32)0x00000000U \ | (uint32)0x00000000U \ | (uint32)0x00000000U \ + | (uint32)0x00000000U \ | (uint32)0x00000008U \ | (uint32)0x00000004U \ | (uint32)0x00000000U \ Index: firmware/source/het.c =================================================================== diff -u -raa36ab1ed13d099286cedcbd066f7dce11146d13 -r45263215b372cd579e8e16bb8073c287c726c55d --- firmware/source/het.c (.../het.c) (revision aa36ab1ed13d099286cedcbd066f7dce11146d13) +++ firmware/source/het.c (.../het.c) (revision 45263215b372cd579e8e16bb8073c287c726c55d) @@ -1116,9 +1116,9 @@ | (uint32) 0x00000000U | (uint32) 0x10000000U | (uint32) 0x00000000U + | (uint32) 0x04000000U | (uint32) 0x00000000U | (uint32) 0x00000000U - | (uint32) 0x01000000U | (uint32) 0x00000000U | (uint32) 0x00400000U | (uint32) 0x00000000U @@ -1250,7 +1250,6 @@ hetREG1->HRSH = (uint32) 0x00000000U | (uint32) 0x00000000U | (uint32) 0x00000000U - | (uint32) 0x00001000U | (uint32) 0x00000000U | (uint32) 0x00000000U | (uint32) 0x00000000U @@ -1259,6 +1258,7 @@ | (uint32) 0x00000000U | (uint32) 0x00000000U | (uint32) 0x00000000U + | (uint32) 0x00000000U | (uint32) 0x00000008U | (uint32) 0x00000004U | (uint32) 0x00000000U