Index: firmware/App/Controllers/BalancingChamber.c =================================================================== diff -u -rd748813399d38ef5b71d760e327e368cc82d7a38 -r5d60262836ddc8f80ac98f07f2cfd6707a5b7b79 --- firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision d748813399d38ef5b71d760e327e368cc82d7a38) +++ firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision 5d60262836ddc8f80ac98f07f2cfd6707a5b7b79) @@ -7,8 +7,8 @@ * * @file BalancingChamber.c * -* @author (last) Vinayakam Mani -* @date (last) 11-Feb-2026 +* @author (last) Sameer Kalliadan Poyil +* @date (last) 10-Feb-2026 * * @author (original) Vinayakam Mani * @date (original) 28-Jan-2025 @@ -59,7 +59,7 @@ static U32 balChamberValveClosePeriod; ///< Close balancing chamber valves with the defined time prior switching state. static U32 currentBalChamberSwitchingCounter; ///< Counter (in task interval) to monitor the timing spent during balancing chamber fill/drain operation. static BOOL isBalChamberFillInProgress; ///< Flag indicating balancing chamber fill/drain is in progress. -static BOOL isPressureStabilizedDuringFill; ///< Flag indicating that the pressure is stabilized due to fill complete. +static BOOL isPressureStalbilizedDuringFill; ///< Flag indicating that the pressure is stablized due to fill complete. static BAL_CHAMBER_SW_STATE_T balChamberSWState; ///< Current balancing chamber switching state ( state 1 or state 2). static U32 balChamberDataPublicationTimerCounter; ///< Used to schedule balancing chamber data publication to CAN bus. static U32 balChamberFillPressureDropCounter; ///< Counter to check balancing chamber valves opened and there by pressure drop is seen. @@ -121,7 +121,7 @@ balChamberValveClosePeriod = 0; isBalChamberFillInProgress = FALSE; currentBalChamberSwitchingCounter = 0; - isPressureStabilizedDuringFill = FALSE; + isPressureStalbilizedDuringFill = FALSE; lastTdDialysateFlowrate = 0.0F; balChamberDataPublicationTimerCounter = 0; balChamberFillPressureDropCounter = 0; @@ -517,7 +517,7 @@ BAL_CHAMBER_EXEC_STATE_T state = BAL_CHAMBER_STATE1_FILL_START; currentBalChamberSwitchingCounter = 0; isBalChamberFillInProgress = FALSE; - isPressureStabilizedDuringFill = FALSE; + isPressureStalbilizedDuringFill = FALSE; isPressureDroppedDuringFill = FALSE; balChamberSWState = BAL_CHAMBER_SW_STATE1; @@ -526,9 +526,6 @@ freshDialPressure = getFilteredPressure( D18_PRES ); spentDialPressure = getFilteredPressure( D51_PRES ); - //Set Trimmer heater Target temp every BC cycle to catch up fresh dialysate temp - setHeaterTargetTemperature( D45_HEAT, getD4AverageTemperature() ); - BOOL isFreshDialysatePressureInRange = ( freshDialPressure >= FRESH_DIAL_PRESSURE_MIN_PSIG ) && ( freshDialPressure <= FRESH_DIAL_PRESSURE_MAX_PSIG ); BOOL isSpentDialysatePressureInRange = ( spentDialPressure >= SPENT_DIAL_PRESSURE_MIN_PSIG ) && ( spentDialPressure <= SPENT_DIAL_PRESSURE_MAX_PSIG ); BOOL isBCSwitchOnlyStatus = ( TRUE == getBalChamberSwitchingOnlyStatus() ); @@ -622,7 +619,7 @@ * The handleBalChamberState1ValvesClose function check for the balancing chamber * fill complete and close the currently opened valves. * @details \b Inputs: currentBalChamberSwitchingCounter, spent and fresh dialysate pressure - * @details \b Outputs: isPressureStabilizedDuringFill,isBalChamberFillInProgress + * @details \b Outputs: isPressureStalbilizedDuringFill,isBalChamberFillInProgress * @return next balancing chamber state. *************************************************************************/ static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState1ValvesClose( void ) @@ -635,18 +632,25 @@ spentDialPressure = getFilteredPressure( D51_PRES ); // Check fresh and spent dialysate pressure back in range to indicate fill complete. - if ( TRUE == isFreshDialysatePressureInRange && TRUE == isSpentDialysatePressureInRange ) + if ( getTestConfigStatus( TEST_CONFIG_DD_DISABLE_BC_PRESSURE_ALARMS ) != TRUE ) { - if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) + if ( TRUE == isFreshDialysatePressureInRange && TRUE == isSpentDialysatePressureInRange ) { - // stabilized pressure indicating fill is complete - isPressureStabilizedDuringFill = TRUE; + if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) + { + // stabilized pressure indicating fill is complete + isPressureStalbilizedDuringFill = TRUE; + } } } + else + { + isPressureStalbilizedDuringFill = FALSE; + } // Switching time met or pressure in range, close valves if ( ( currentBalChamberSwitchingCounter >= balChamberValveClosePeriod ) || - ( TRUE == isPressureStabilizedDuringFill ) ) + ( TRUE == isPressureStalbilizedDuringFill ) ) { // close the state 1 opened valves valveControlForBCState1FillEnd(); @@ -690,7 +694,7 @@ // When fill initiated, pressure is not dropped to the expected range, possible valve failures. SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DD_BC_STATE1_FILL_PRESSURE_DROP_OUT_OF_RANGE, freshDialPressure, spentDialPressure ); } - else if ( TRUE != isPressureStabilizedDuringFill ) + else if ( TRUE != isPressureStalbilizedDuringFill ) { // Alarm when switching time expired, but still pressure not in range which indicates fill is not yet completed. SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DD_BC_STATE1_FILL_END_PRESSURE_OUT_OF_RANGE, freshDialPressure, spentDialPressure ); @@ -731,7 +735,7 @@ BAL_CHAMBER_EXEC_STATE_T state = BAL_CHAMBER_STATE2_FILL_START; currentBalChamberSwitchingCounter = 0; isBalChamberFillInProgress = FALSE; - isPressureStabilizedDuringFill = FALSE; + isPressureStalbilizedDuringFill = FALSE; isPressureDroppedDuringFill = FALSE; balChamberSWState = BAL_CHAMBER_SW_STATE2; @@ -740,9 +744,6 @@ freshDialPressure = getFilteredPressure( D18_PRES ); spentDialPressure = getFilteredPressure( D51_PRES ); - //Set Trimmer heater Target temp every BC cycle to catch up fresh dialysate temp - setHeaterTargetTemperature( D45_HEAT, getD4AverageTemperature() ); - BOOL isFreshDialysatePressureInRange = ( freshDialPressure >= FRESH_DIAL_PRESSURE_MIN_PSIG ) && ( freshDialPressure <= FRESH_DIAL_PRESSURE_MAX_PSIG ); BOOL isSpentDialysatePressureInRange = ( spentDialPressure >= SPENT_DIAL_PRESSURE_MIN_PSIG ) && ( spentDialPressure <= SPENT_DIAL_PRESSURE_MAX_PSIG ); BOOL isBCSwitchOnlyStatus = ( TRUE == getBalChamberSwitchingOnlyStatus() ); @@ -785,7 +786,7 @@ * The handleBalChamberState2ValvesClose function check for the balancing chamber * fill complete and close the currently opened valves. * @details \b Inputs: currentBalChamberSwitchingCounter, spent and fresh dialysate pressure - * @details \b Outputs: isPressureStabilizedDuringFill,isBalChamberFillInProgress + * @details \b Outputs: isPressureStalbilizedDuringFill,isBalChamberFillInProgress * @return next balancing chamber state. *************************************************************************/ static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState2ValvesClose( void ) @@ -798,18 +799,25 @@ spentDialPressure = getFilteredPressure( D51_PRES ); // Check fresh and spent dialysate pressure back in range to indicate fill complete. - if ( ( TRUE == isFreshDialysatePressureInRange ) && ( TRUE == isSpentDialysatePressureInRange ) ) + if ( getTestConfigStatus( TEST_CONFIG_DD_DISABLE_BC_PRESSURE_ALARMS ) != TRUE ) { - if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) + if ( ( TRUE == isFreshDialysatePressureInRange ) && ( TRUE == isSpentDialysatePressureInRange ) ) { - // stabilized pressure indicating fill is complete - isPressureStabilizedDuringFill = TRUE; + if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) + { + // stabilized pressure indicating fill is complete + isPressureStalbilizedDuringFill = TRUE; + } } } + else + { + isPressureStalbilizedDuringFill = FALSE; + } // Check switching cycle time or pressure check for valve closure if ( ( currentBalChamberSwitchingCounter >= balChamberValveClosePeriod ) || - ( TRUE == isPressureStabilizedDuringFill ) ) + ( TRUE == isPressureStalbilizedDuringFill ) ) { // close the valves valveControlForBCState2FillEnd(); @@ -827,7 +835,7 @@ * The handleBalChamberState2FillEnd function check for the balancing chamber * switching period complete and transition to next state. * @details \b Inputs: currentBalChamberSwitchingCounter, balChamberSwitchingPeriod - * @details \b Outputs: isPressureStabilizedDuringFill,isBalChamberFillInProgress + * @details \b Outputs: isPressureStalbilizedDuringFill,isBalChamberFillInProgress * @details \b Alarm: ALARM_ID_DD_BC_STATE2_FILL_PRESSURE_DROP_OUT_OF_RANGE * when pressure is not in range during balacing chamber state 2 fill in progress. * @details \b Alarm: ALARM_ID_DD_BC_STATE2_FILL_END_PRESSURE_OUT_OF_RANGE @@ -854,7 +862,7 @@ // When fill initiated, pressure is not dropped to the expected range, possible valve failures. SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DD_BC_STATE2_FILL_PRESSURE_DROP_OUT_OF_RANGE, freshDialPressure, spentDialPressure ); } - else if ( TRUE != isPressureStabilizedDuringFill ) + else if ( TRUE != isPressureStalbilizedDuringFill ) { // Alarm when switching time expired, but still pressure not in range which indicates fill is not completed. SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DD_BC_STATE2_FILL_END_PRESSURE_OUT_OF_RANGE, freshDialPressure, spentDialPressure ); @@ -928,7 +936,7 @@ data.balChamberSwPeriod = balChamberSwitchingPeriod; data.isBalChamberFillInProgress = isBalChamberFillInProgress; data.currentBalChamberSwitchingCounter = currentBalChamberSwitchingCounter; - data.isPressureStabilizedDuringFill = isPressureStabilizedDuringFill; + data.isPressureStalbilizedDuringFill = isPressureStalbilizedDuringFill; data.balChamberSWOnlyState = balanceChamberSwitchingOnly; broadcastData( MSG_ID_DD_BAL_CHAMBER_DATA, COMM_BUFFER_OUT_CAN_DD_BROADCAST, (U08*)&data, sizeof( BAL_CHAMBER_DATA_T ) ); Index: firmware/App/Controllers/BalancingChamber.h =================================================================== diff -u -rd748813399d38ef5b71d760e327e368cc82d7a38 -r5d60262836ddc8f80ac98f07f2cfd6707a5b7b79 --- firmware/App/Controllers/BalancingChamber.h (.../BalancingChamber.h) (revision d748813399d38ef5b71d760e327e368cc82d7a38) +++ firmware/App/Controllers/BalancingChamber.h (.../BalancingChamber.h) (revision 5d60262836ddc8f80ac98f07f2cfd6707a5b7b79) @@ -8,7 +8,7 @@ * @file BalancingChamber.h * * @author (last) Vinayakam Mani -* @date (last) 04-Feb-2026 +* @date (last) 03-Oct-2025 * * @author (original) Vinayakam Mani * @date (original) 28-Jan-2025 @@ -48,7 +48,7 @@ U32 balChamberSwPeriod; ///< Balancing chamber switching period BOOL isBalChamberFillInProgress; ///< Whether balancing chamber fill in progress or not U32 currentBalChamberSwitchingCounter; ///< Current balancing chamber switching counter - BOOL isPressureStabilizedDuringFill; ///< Whether pressure stabilized during fill or not + BOOL isPressureStalbilizedDuringFill; ///< Whether pressure stabilized during fill or not BOOL balChamberSWOnlyState; ///< Balancing chamber switching only status ( On/Off) } BAL_CHAMBER_DATA_T; Index: firmware/App/Controllers/ConcentratePumps.c =================================================================== diff -u -rd748813399d38ef5b71d760e327e368cc82d7a38 -r5d60262836ddc8f80ac98f07f2cfd6707a5b7b79 --- firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision d748813399d38ef5b71d760e327e368cc82d7a38) +++ firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 5d60262836ddc8f80ac98f07f2cfd6707a5b7b79) @@ -7,14 +7,14 @@ * * @file ConcentratePumps.c * -* @author (last) Vinayakam Mani -* @date (last) 11-Feb-2026 +* @author (last) Sameer Kalliadan Poyil +* @date (last) 03-Feb-2026 * * @author (original) Vinayakam Mani * @date (original) 19-Sep-2024 * ***************************************************************************/ -#include // for fabs() +#include #include "ConcentratePumps.h" #include "FpgaDD.h" @@ -36,12 +36,12 @@ #define CONCENTRATE_PUMP_REVERSE_DIR 0x0 ///< Concentrate pump reverse direction configuration. #define CONCENTRATE_PUMP_RAMP_SPEED_INCREMENT 10.0F ///< Speed increase (mL/min) when controlling concentrate pump to target step speed. -#define CONCENTRATE_PUMP_MIN_SPEED 0.0F ///< Minimum speed for concentrate pump in mL per min. -#define CONCENTRATE_PUMP_SPD_OUT_OF_RANGE_TOL_WHEN_ON_PCT 0.0075F ///< Concentrate pump speed out of range tolerance when on in percentage. +#define CONCENTRATE_PUMP_MIN_SPEED 3.0F ///< Minimum speed for concentrate pump in mL per min. +#define CONCENTRATE_PUMP_SPD_OUT_OF_RANGE_TOL_WHEN_ON_PCT 0.01F ///< Concentrate pump speed out of range tolerance when on in percentage. #define CONCENTRATE_PUMP_CLEANING_SPD_OUT_OF_RANGE_TOL_PCT 0.05F ///< Concentrate pump cleaning mode speed out of range tolerance when on in percentage. -#define CONCENTRATE_PUMP_SPD_OUT_OF_RANGE_TOL_WHEN_SLOW_MLPM 0.5F ///< Concentrate pump speed out of range tolerance when slow in mL/min. -#define CONCENTRATE_PUMP_LOW_SPEED_THRESHOLD_MLPM 5.0F ///< Concentrate pump low speed threshold in mL/min. -#define CONCENTRATE_PUMP_ZERO_FLOW_RATE 0xFFFFFFFF ///< Pulse width value when zero flow rate or pump is off. +#define CONCENTRATE_PUMP_SPD_OUT_OF_RANGE_TOL_WHEN_SLOW_MLPM 1.0F ///< Concentrate pump speed out of range tolerance when slow in mL/min. +#define CONCENTRATE_PUMP_LOW_SPEED_THRESHOLD_MLPM 10.0F ///< Concentrate pump low speed threshold in mL/min. +#define CONCENTRATE_PUMP_ZERO_FLOW_RATE 0xFFFF ///< Pulse width value when zero flow rate or pump is off. #define CONCENTRATE_PUMP_VOLUME_PER_REV_DIENER 0.4F ///< Volume output every revolution (mL). #define CONCENTRATE_PUMP_VOLUME_PER_REV 0.1F ///< Volume output every revolution (mL). @@ -62,8 +62,7 @@ #define CONCENTRATE_PUMP_DATA_PUBLISH_INTERVAL ( 1000 / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) at which the concentrate pump is monitored. #define CONCENTRATE_PUMP_CONTROL_INTERVAL ( 100 / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) at which the concentrate pump is controlled. -#define CONCENTRATE_PUMP_SPEED_OUT_OF_RANGE_TIMEOUT_MS ( 1 * MS_PER_SECOND ) ///< Concentrate pumps speed out of range timeout in milliseconds. -#define UF_PUMP_SPEED_OUT_OF_RANGE_TIMEOUT_MS ( 2 * MS_PER_SECOND ) ///< UF pump speed out of range timeout in milliseconds. +#define CONCENTRATE_PUMP_SPEED_OUT_OF_RANGE_TIMEOUT_MS ( 10 * MS_PER_SECOND ) ///< Concentrate pumps speed out of range timeout in milliseconds. #define NUMBER_OF_ACID_AND_BICARB_NV_DATA_TO_CHECK 1 ///< Number of acid and bicarb non-volatile data to check. #define DATA_PUBLISH_COUNTER_START_COUNT 0 ///< Data publish counter start count. @@ -108,7 +107,7 @@ CONCENTRATE_PUMP_STATE_T execState; ///< Concentrate pump execute current state. BOOL hasTurnOnPumpsBeenRequested; ///< Flag indicates a request to turn concentrate pumps on. F32 currentPumpSpeed; ///< Current controlled concentrate pumps' speed (mL/min). - U32 togglePeriodCount; ///< Converted pump speed (mL/min) to toggle period counts (0.5 uS increment counts per step). + U16 togglePeriodCount; ///< Converted pump speed (mL/min) to toggle period counts (0.5 uS increment counts per step). U08 direction; ///< Concentrate pump motor direction. U08 controlSet; ///< Concentrate pump control set. (Used in DVT) F32 pulseWidthUS; ///< Concentrate pump pulse width in microseconds. @@ -223,7 +222,7 @@ initPersistentAlarm( ALARM_ID_DD_D11_PUMP_SPEED_CONTROL_ERROR, 0, CONCENTRATE_PUMP_SPEED_OUT_OF_RANGE_TIMEOUT_MS ); initPersistentAlarm( ALARM_ID_DD_D10_PUMP_SPEED_CONTROL_ERROR, 0, CONCENTRATE_PUMP_SPEED_OUT_OF_RANGE_TIMEOUT_MS ); - initPersistentAlarm( ALARM_ID_DD_D76_PUMP_SPEED_CONTROL_ERROR, 0, UF_PUMP_SPEED_OUT_OF_RANGE_TIMEOUT_MS ); + initPersistentAlarm( ALARM_ID_DD_D76_PUMP_SPEED_CONTROL_ERROR, 0, CONCENTRATE_PUMP_SPEED_OUT_OF_RANGE_TIMEOUT_MS ); initPersistentAlarm( ALARM_ID_DD_CONC_PUMP_HALL_SENSOR_OUT_OF_RANGE, CONCENTRATE_PUMP_HALL_SENSORS_OUT_OF_RANGE_TIME_MS, CONCENTRATE_PUMP_HALL_SENSORS_OUT_OF_RANGE_TIME_MS ); initPersistentAlarm( ALARM_ID_DD_CONCENTRATE_PUMP_FAULT, CONCENTRATE_PUMP_FAULT_PERSISTENCE_PERIOD, CONCENTRATE_PUMP_FAULT_PERSISTENCE_PERIOD ); } @@ -577,11 +576,22 @@ } /* - * If 0.0 <= speed <= 200 set it - * If speed < 0.0 set to 0 - * else speed > 200 set to 200 + * If 3.0 <= speed <= 60 set it + * If speed < 3.0 set to 0 + * else speed > 60 set to 60 */ - pumpTargetSpeed[ pumpId ].data = RANGE(targetSpeed_ml_min, CONCENTRATE_PUMP_MIN_SPEED, CONCENTRATE_PUMP_MAX_SPEED ); + if ( ( CONCENTRATE_PUMP_MIN_SPEED <= targetSpeed_ml_min ) && ( targetSpeed_ml_min <= CONCENTRATE_PUMP_MAX_SPEED ) ) + { + pumpTargetSpeed[ pumpId ].data = targetSpeed_ml_min; + } + else if ( targetSpeed_ml_min < CONCENTRATE_PUMP_MIN_SPEED ) + { + pumpTargetSpeed[ pumpId ].data = 0.0; + } + else + { + pumpTargetSpeed[ pumpId ].data = DOSING_CONCENTRATE_PUMP_SPEED; + } } else { @@ -1047,7 +1057,7 @@ timePerStep = CONCENTRATE_PUMP_VOLUME_PER_REV_DIENER / ( concentratePumps[ pumpId ].currentPumpSpeed * CONCENTRATE_PUMP_STEP_PER_REV ); stepPeriodCounts = timePerStep / ( CONCENTRATE_PUMP_STEP_PERIOD_RESOLUTION * CONCENTRATE_PUMP_MICRO_STEPS_PER_STEP ); - concentratePumps[ pumpId ].togglePeriodCount = (U32)( stepPeriodCounts + FLOAT_TO_INT_ROUNDUP_OFFSET ); + concentratePumps[ pumpId ].togglePeriodCount = (U16)( stepPeriodCounts + FLOAT_TO_INT_ROUNDUP_OFFSET ); } else { @@ -1087,7 +1097,7 @@ static void calcMeasuredPumpsSpeed( void ) { CONCENTRATE_PUMPS_T pumpId; - U32 pulseWidthCount = 0; + U16 pulseWidthCount = 0; F32 pulseWidthInMicroSeconds = 0.0F; BOOL isPulseWidthOut = FALSE; CONCENTRATE_PUMPS_T pumpInAlarm = CONCENTRATEPUMPS_FIRST; @@ -1402,7 +1412,6 @@ BOOL testConcentratePumpStartStopOverride( MESSAGE_T *message ) { BOOL result = FALSE; - BOOL speedRangeCheck = FALSE; // Verify tester has logged in with DD if ( TRUE == isTestingActivated() ) @@ -1416,10 +1425,10 @@ if ( (CONCENTRATE_PUMPS_T)payload.pumpID < NUM_OF_CONCENTRATE_PUMPS ) { - speedRangeCheck = ( ( payload.speed >= CONCENTRATE_PUMP_MIN_SPEED ) && ( payload.speed <= CONCENTRATE_PUMP_MAX_SPEED )? TRUE : FALSE ); - // Handle start command - if ( ( TRUE == payload.startStop ) && ( TRUE == speedRangeCheck ) && ( payload.volume > 0.0 ) ) + if ( ( TRUE == payload.startStop ) && + ( ( payload.speed >= CONCENTRATE_PUMP_MIN_SPEED ) && ( payload.speed <= DOSING_CONCENTRATE_PUMP_SPEED ) ) && + ( payload.volume > 0.0 ) ) { setConcentratePumpTargetSpeed( (CONCENTRATE_PUMPS_T)payload.pumpID, payload.speed, payload.volume ); requestConcentratePumpOn ( (CONCENTRATE_PUMPS_T)payload.pumpID ); Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -rd748813399d38ef5b71d760e327e368cc82d7a38 -r5d60262836ddc8f80ac98f07f2cfd6707a5b7b79 --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision d748813399d38ef5b71d760e327e368cc82d7a38) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 5d60262836ddc8f80ac98f07f2cfd6707a5b7b79) @@ -7,8 +7,8 @@ * * @file Heaters.c * -* @author (last) Vinayakam Mani -* @date (last) 11-Feb-2026 +* @author (last) Michael Garthwaite +* @date (last) 13-Jan-2026 * * @author (original) Vinayakam Mani * @date (original) 11-Oct-2024 @@ -56,6 +56,9 @@ #define MAX_ADJ_DELTA_TEMP_C 7.0F ///< Maximum adjusted delta temperature to add/remove from calculated target temperature #define D5_HEAT_TX_INIT_FEED_FORWARD 0.0F ///< Initial Feed forward term for heater control +//#define D5_HEAT_TX_P_COEFFICIENT 0.050F ///< P Term for AC primary heater control during treatment mode. +//#define D5_HEAT_TX_I_COEFFICIENT 0.015F ///< I Term for AC primary heater control during treatment mode. + #define D5_HEAT_TX_P_COEFFICIENT 0.035F ///< P Term for AC primary heater control during treatment mode. #define D5_HEAT_TX_I_COEFFICIENT 0.004F ///< I Term for AC primary heater control during treatment mode. @@ -76,11 +79,12 @@ #define HEATERS_MAX_VOLTAGE_OUT_OF_RANGE_TOL 0.2F ///< Heaters max voltage out of range tolerance. #define D5_HEATER_DEADBAND_CONTROL 0.1F ///< Heater deadband range for conrtol. +//#define D5_HEAT_CONTROL_INTERVAL_MS 30000 /// Primary heater control interval in milli seconds #define D5_HEAT_CONTROL_INTERVAL_MS 3000 /// Primary heater control interval in milli seconds #define D5_HEAT_CONTROL_INTERVAL_COUNT ( D5_HEAT_CONTROL_INTERVAL_MS / TASK_GENERAL_INTERVAL ) ///< Primary heater control interval count. #define D45_HEAT_CONTROL_INTERVAL_MS ( 1 * MS_PER_SECOND ) ///< Trimmer heater control interval in milli seconds #define D45_HEAT_CONTROL_INTERVAL_COUNT ( D45_HEAT_CONTROL_INTERVAL_MS / TASK_GENERAL_INTERVAL ) ///< Trimmer heater control interval count. -#define D5_TARGET_TEMP_ADJUST_INTERVAL_MS ( 3 * SEC_PER_MIN * MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Adjust primary target temperature +#define D5_TARGET_TEMP_ADJUST_INTERVAL_MS ( 3 * SEC_PER_MIN * MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Adjust primary target temperature #define PRIMARY_HEATER_MAX_PWR_WATTS 1400.0F ///< AC Primary Heater Max Power consumeption in Watts #define TX_PRIMARY_HEATER_MAX_PWR_WATTS 700.0F ///< Estimated power to be supplied to the primary heater during treatement mode #define HEAT_PRIMARY_HEATER_MAX_PWR_WATTS 980.0F ///< Estimated power to be supplied to the primary heater during heat disinfect mode @@ -127,12 +131,12 @@ static U32 dataPublicationTimerCounter; ///< Data publication timer counter. static U32 primaryTargetTempAdjCounter; ///< Primary target temperature adjustment counter. static BOOL isTargetTempAdjusted; ///< Flag indicating that target temperature is adjusted -static F32 adjustedPrimaryTargetTemp; ///< Adjusted primary target temperature +static U32 adjustedPrimaryTargetTemp; ///< Adjusted primary target temperature static BOOL isDialyzerTempFeedbackEnabled; ///< Flag indicating enable/disable the dilayser temp ( D28) based feedback adjustment static const F32 WATER_SPECIFIC_HEAT_DIVIDED_BY_MINUTES = 4184.0F / (F32)SEC_PER_MIN; ///< Water specific heat in J/KgC / 60. static OVERRIDE_U32_T heatersDataPublishInterval = { HEATERS_DATA_PUBLISH_INTERVAL, HEATERS_DATA_PUBLISH_INTERVAL, 0, 0 }; ///< Heaters data publish time interval. static F32 convertDC; ///< AC Heater converted duty cycle -static F32 lastDialTargetTemperatureSet[ NUM_OF_DD_HEATERS ]; ///< last dialysate target temperature set for heater control +static F32 lastDialTargetTemperatureSet; ///< last dialysate target temperature set for heater control static BOOL startupHeaterControl; ///< First time control with the energy equation. //For testing @@ -196,8 +200,7 @@ heatersStatus[ D5_HEAT ].controlIntervalCounter = D5_HEAT_CONTROL_INTERVAL_START_COUNT; heatersStatus[ D45_HEAT ].controlIntervalCounter = 0; startupHeaterControl = TRUE; - lastDialTargetTemperatureSet[ D5_HEAT ] = 0.0F; - lastDialTargetTemperatureSet[ D45_HEAT ] = 0.0F; + lastDialTargetTemperatureSet = 0.0F; primaryTargetTempAdjCounter = 0; adjustedPrimaryTargetTemp = 0.0F; isTargetTempAdjusted = FALSE; @@ -270,17 +273,18 @@ // Check if the requested temperature is within the allowed range if ( ( ( targetTemperature >= HEATER_TARGET_TEMPERATURE_MIN ) && ( targetTemperature <= HEATER_TARGET_TEMPERATURE_MAX ) ) && - ( lastDialTargetTemperatureSet[ heater ] != targetTemperature ) ) + ( lastDialTargetTemperatureSet != targetTemperature ) ) { targetTempC[ heater ].data = targetTemperature; heatersStatus[ heater ].hasTargetTempChanged = TRUE; result = TRUE; - lastDialTargetTemperatureSet[ heater ] = targetTemperature; + lastDialTargetTemperatureSet = targetTemperature; if ( D5_HEAT == heater ) { startupHeaterControl = TRUE; } + } } else @@ -773,31 +777,31 @@ control[ heater ].data = ctrl; } } -//#ifdef __HEATERS_DEBUG__ -// U32 i; -// -// for ( i = 0; i < NUM_OF_CONTROLLER_SIGNAL; i++ ) -// { -// pIControlSignal[ i ] = getPIControllerSignals( PI_CONTROLLER_ID_D5_HEAT, (PI_CONTROLLER_SIGNALS_ID)i ); -// } -//#endif - } - else - { - measuredTemperature = getD50AverageTemperature(); - - ctrl = runPIController( PI_CONTROLLER_ID_D45_HEAT, targetTemperature, measuredTemperature ); - control[ heater ].data = ctrl; #ifdef __HEATERS_DEBUG__ U32 i; for ( i = 0; i < NUM_OF_CONTROLLER_SIGNAL; i++ ) { - pIControlSignal[ i ] = getPIControllerSignals( PI_CONTROLLER_ID_D45_HEAT, (PI_CONTROLLER_SIGNALS_ID)i ); + pIControlSignal[ i ] = getPIControllerSignals( PI_CONTROLLER_ID_D5_HEAT, (PI_CONTROLLER_SIGNALS_ID)i ); } #endif } + else + { + measuredTemperature = getD50AverageTemperature(); + ctrl = runPIController( PI_CONTROLLER_ID_D45_HEAT, targetTemperature, measuredTemperature ); + control[ heater ].data = ctrl; +//#ifdef __HEATERS_DEBUG__ +// U32 i; +// +// for ( i = 0; i < NUM_OF_CONTROLLER_SIGNAL; i++ ) +// { +// pIControlSignal[ i ] = getPIControllerSignals( PI_CONTROLLER_ID_D45_HEAT, (PI_CONTROLLER_SIGNALS_ID)i ); +// } +//#endif + } + heatersStatus[ heater ].hasTargetTempChanged = FALSE; heatersStatus[ heater ].controlIntervalCounter = 0; Index: firmware/App/Controllers/Ultrafiltration.c =================================================================== diff -u -rd748813399d38ef5b71d760e327e368cc82d7a38 -r5d60262836ddc8f80ac98f07f2cfd6707a5b7b79 --- firmware/App/Controllers/Ultrafiltration.c (.../Ultrafiltration.c) (revision d748813399d38ef5b71d760e327e368cc82d7a38) +++ firmware/App/Controllers/Ultrafiltration.c (.../Ultrafiltration.c) (revision 5d60262836ddc8f80ac98f07f2cfd6707a5b7b79) @@ -8,7 +8,7 @@ * @file Ultrafiltration.c * * @author (last) Vinayakam Mani -* @date (last) 09-Feb-2026 +* @date (last) 31-Jul-2025 * * @author (original) Vinayakam Mani * @date (original) 28-Jul-2025 @@ -104,22 +104,9 @@ // Calculate UF volume and determine UF pause/run updateUFRequest(); - // Trimmer heater enabled, hence UF temp compensation is optional - if ( getTestConfigStatus( TEST_CONFIG_DD_ENABLE_UF_TEMP_COMPENSATION ) == TRUE ) - { - // Compensate balancing error at defined interval - UpdateUFCompensation(); - } - else if ( TRUE == isUFRateUpdated ) - { - //get updated UF rate - compUFrate = getTDUFRate(); + // Compensate balancing error at defined interval + UpdateUFCompensation(); - // Update UF rate - setConcentratePumpTargetSpeed( D76_PUMP, compUFrate, DOSING_CONT_VOLUME ); - isUFRateUpdated = FALSE; - } - // execute current ultrafiltration exec state switch ( ufExecState ) { @@ -194,10 +181,10 @@ /*********************************************************************//** * @brief - * The updateUFRequest function updates the ultrafiltration requested - * flag to true or false based on the conditions. + * The updateUFRequest function updates the ultrafiltration rate per iteration + * and of the ultrafiltration. * @details \b Inputs: TD Uf rate, TD Dialysate flow rate and bypass flag - * @details \b Outputs: isUltrafiltrationRequested + * @details \b Outputs: ufVolumeperIteration , isUltrafiltrationRequested * @return none. *************************************************************************/ static void updateUFRequest( void ) Index: firmware/App/DDCommon.h =================================================================== diff -u -r1c4e2ce92ecb2e4b4301aba7bd2b869f1116d0f6 -r5d60262836ddc8f80ac98f07f2cfd6707a5b7b79 --- firmware/App/DDCommon.h (.../DDCommon.h) (revision 1c4e2ce92ecb2e4b4301aba7bd2b869f1116d0f6) +++ firmware/App/DDCommon.h (.../DDCommon.h) (revision 5d60262836ddc8f80ac98f07f2cfd6707a5b7b79) @@ -25,7 +25,7 @@ #define DD_VERSION_MAJOR 0 #define DD_VERSION_MINOR 0 #define DD_VERSION_MICRO 0 -#define DD_VERSION_BUILD 47 +#define DD_VERSION_BUILD 46 // ********** development build switches ********** Index: firmware/App/Modes/ModeGenDialysate.c =================================================================== diff -u -rd748813399d38ef5b71d760e327e368cc82d7a38 -r5d60262836ddc8f80ac98f07f2cfd6707a5b7b79 --- firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision d748813399d38ef5b71d760e327e368cc82d7a38) +++ firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision 5d60262836ddc8f80ac98f07f2cfd6707a5b7b79) @@ -7,8 +7,8 @@ * * @file ModeGenDialysate.c * -* @author (last) Vinayakam Mani -* @date (last) 11-Feb-2026 +* @author (last) Sameer Kalliadan Poyil +* @date (last) 06-Feb-2026 * * @author (original) Vinayakam Mani * @date (original) 06-Nov-2024 @@ -235,10 +235,6 @@ setD28TempFeedbackControl( TRUE ); startHeater( D5_HEAT ); - //Turn on Trimmer heater - setHeaterTargetTemperature( D45_HEAT, getD4AverageTemperature() ); - startHeater( D45_HEAT ); - //Testing : Enable close loop once testing is complete //setDialysatePumpTargetRPM( D12_PUMP, FRESH_DIAL_PUMP_INITIAL_RPM, FALSE ); setDialysatePumpTargetRPM( D12_PUMP, FRESH_DIAL_PUMP_INITIAL_RPM, TRUE ); @@ -272,10 +268,6 @@ setD28TempFeedbackControl( TRUE ); startHeater( D5_HEAT ); - //Turn on Trimmer heater - setHeaterTargetTemperature( D45_HEAT, getD4AverageTemperature() ); - startHeater( D45_HEAT ); - //setDialysatePumpTargetRPM( D12_PUMP, FRESH_DIAL_PUMP_INITIAL_RPM, FALSE ); setDialysatePumpTargetRPM( D12_PUMP, FRESH_DIAL_PUMP_INITIAL_RPM, TRUE ); //setDialysatePumpTargetRPM( D48_PUMP, SPENT_DIAL_PUMP_INITIAL_RPM, FALSE ); @@ -326,8 +318,6 @@ setHeaterTargetTemperature( D5_HEAT, getGenDialysateTargetTemperature() ); setD28TempFeedbackControl( TRUE ); startHeater( D5_HEAT ); - // Stop trimmer heater - stopHeater( D45_HEAT ); setDialysatePumpTargetRPM( D12_PUMP, FRESH_DIAL_PUMP_INITIAL_RPM, TRUE ); setDialysatePumpTargetRPM( D48_PUMP, SPENT_DIAL_PUMP_FILL_RPM, TRUE ); Index: firmware/App/Monitors/Temperature.c =================================================================== diff -u -rd748813399d38ef5b71d760e327e368cc82d7a38 -r5d60262836ddc8f80ac98f07f2cfd6707a5b7b79 --- firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision d748813399d38ef5b71d760e327e368cc82d7a38) +++ firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision 5d60262836ddc8f80ac98f07f2cfd6707a5b7b79) @@ -7,8 +7,8 @@ * * @file Temperature.c * -* @author (last) Vinayakam Mani -* @date (last) 11-Feb-2026 +* @author (last) Raghu Kallala +* @date (last) 10-Feb-2026 * * @author (original) Vinayakam Mani * @date (original) 25-Sep-2024 @@ -46,7 +46,7 @@ #define TEMP_SENSORS_DATA_PUBLISH_INTERVAL ( MS_PER_SECOND / TASK_PRIORITY_INTERVAL ) ///< Temperature sensors publish data time interval. #define TEMP_SENSORS_FPGA_ERROR_TIMEOUT_MS ( 2 * MS_PER_SECOND ) ///< Temperature sensors FPGA error timeout in milliseconds. #define D4_TEMP_MOVING_AVG_NUM_OF_SAMPLES 50 ///< D4 temperature sensor moving average number of samples. -#define D50_TEMP_MOVING_AVG_NUM_OF_SAMPLES 50 ///< D50 temperature sensor moving average number of samples. +#define D50_TEMP_MOVING_AVG_NUM_OF_SAMPLES 25 ///< D50 temperature sensor moving average number of samples ( 250ms filter ). #define D99_TEMP_MOVING_AVG_NUM_OF_SAMPLES 50 ///< D99 temperature sensor moving average number of samples #define DATA_PUBLISH_COUNTER_START_COUNT 30 ///< Data publish counter start count. #define DIAL_TEMP_MOVING_AVG_NUM_OF_SAMPLES 30 ///< Dialysate temperature sensors moving average number of samples. @@ -95,9 +95,8 @@ static F32 d4TempSamplesC[ D4_TEMP_MOVING_AVG_NUM_OF_SAMPLES ]; ///< D4 temperature samples array in C. static U32 d4TempSamplesNextIndex; ///< D4 temperature sample next index number. static U32 d4TempCount; ///< D4 Number of samples in average buffer. -static U32 tempDataCollectionTimeInterval; ///< Temperature data collection time interval in milliseconds. +static U32 tempDataColTimeInterval; ///< Temperature data collection time interval in milliseconds. static U32 d4TempSampleIntervalCounter; ///< D4 temperature sensor sample collection timer counter. -static U32 d50TempSampleIntervalCounter; ///< D50 temperature sensor sample collection timer counter. static F32 d50TempAvgC; ///< D50 temperature average in C. static F32 d50TempRunningSumC; ///< D50 temperature running sum in C. @@ -152,9 +151,8 @@ d99TempSamplesNextIndex = 0; d99TempCount = 0; d4TempSampleIntervalCounter = 0; - d50TempSampleIntervalCounter = 0; d99TempSampleIntervalCounter = 0; - tempDataCollectionTimeInterval = 0; + tempDataColTimeInterval = 0; tempDriftEventCheck = FALSE; dialTempMovingAvgData[ DIAL_TEMP_D28 ].dialTempColHasTimerBeenSet = FALSE; @@ -311,7 +309,7 @@ static void filterTemperatureReadings( void ) { // Moving average sample collection interval varies based on the dialysate flow rate - if ( ++d4TempSampleIntervalCounter >= tempDataCollectionTimeInterval ) + if ( ++d4TempSampleIntervalCounter >= tempDataColTimeInterval ) { // Filter D4 Temperature for AC heater if ( d4TempCount >= D4_TEMP_MOVING_AVG_NUM_OF_SAMPLES ) @@ -328,26 +326,22 @@ d4TempSampleIntervalCounter = 0; } - // Moving average sample collection interval varies based on the dialysate flow rate - if ( ++d50TempSampleIntervalCounter >= tempDataCollectionTimeInterval ) + // Filter D50 Temperature ( 250 ms filter ) for trimmer heater + if ( d50TempCount >= D50_TEMP_MOVING_AVG_NUM_OF_SAMPLES ) { - if ( d50TempCount >= D50_TEMP_MOVING_AVG_NUM_OF_SAMPLES ) - { - d50TempRunningSumC -= d50TempSamplesC[ d50TempSamplesNextIndex ]; - } - - F32 d50Temp = getTemperatureValue( D50_TEMP ); - d50TempSamplesC[ d50TempSamplesNextIndex ] = d50Temp; - d50TempRunningSumC += d50Temp; - d50TempSamplesNextIndex = INC_WRAP( d50TempSamplesNextIndex, 0, D50_TEMP_MOVING_AVG_NUM_OF_SAMPLES - 1 ); - d50TempCount = INC_CAP( d50TempCount, D50_TEMP_MOVING_AVG_NUM_OF_SAMPLES ); - d50TempAvgC = d50TempRunningSumC / (F32)d50TempCount; - d50TempSampleIntervalCounter = 0; + d50TempRunningSumC -= d50TempSamplesC[ d50TempSamplesNextIndex ]; } + F32 d50Temp = getTemperatureValue( D50_TEMP ); + d50TempSamplesC[ d50TempSamplesNextIndex ] = d50Temp; + d50TempRunningSumC += d50Temp; + d50TempSamplesNextIndex = INC_WRAP( d50TempSamplesNextIndex, 0, D50_TEMP_MOVING_AVG_NUM_OF_SAMPLES - 1 ); + d50TempCount = INC_CAP( d50TempCount, D50_TEMP_MOVING_AVG_NUM_OF_SAMPLES ); + d50TempAvgC = d50TempRunningSumC / (F32)d50TempCount; + // Moving average sample collection interval varies based on the dialysate flow rate - if ( ++d99TempSampleIntervalCounter >= tempDataCollectionTimeInterval ) + if ( ++d99TempSampleIntervalCounter >= tempDataColTimeInterval ) { // Filter D99 Temperature for fresh dialysate temperature @@ -498,7 +492,7 @@ U32 sampleInterval = (U32)( ( period / (F32)D4_TEMP_MOVING_AVG_NUM_OF_SAMPLES ) * MS_PER_SECOND ); - tempDataCollectionTimeInterval = (U32) ( sampleInterval / TASK_PRIORITY_INTERVAL ); + tempDataColTimeInterval = (U32) ( sampleInterval / TASK_PRIORITY_INTERVAL ); } /*********************************************************************//** Index: firmware/App/Services/FpgaDD.c =================================================================== diff -u -r1c4e2ce92ecb2e4b4301aba7bd2b869f1116d0f6 -r5d60262836ddc8f80ac98f07f2cfd6707a5b7b79 --- firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 1c4e2ce92ecb2e4b4301aba7bd2b869f1116d0f6) +++ firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 5d60262836ddc8f80ac98f07f2cfd6707a5b7b79) @@ -8,8 +8,8 @@ * * @file FpgaDD.c * -* @author (last) Vinayakam Mani -* @date (last) 09-Feb-2026 +* @author (last) Varshini Nagabooshanam +* @date (last) 27-Jan-2026 * * @author (original) Vinayakam Mani * @date (original) 26-Aug-2024 @@ -142,130 +142,149 @@ U16 fpgaD18PresTemp; ///< Reg 534. D18 MPM pressure sensor RAW temperature data U16 fpgaD41PresPressure; ///< Reg 536. D41 MPM pressure sensor RAW pressure data U16 fpgaD41PresTemp; ///< Reg 538. D41 MPM pressure sensor RAW temperature data - U32 fpgaD17CondDataOut; ///< Reg 540. Data read from Conductivity Sensor D17 register - U16 fpgaD17CondCond; ///< Reg 544. D17 conductivity - U16 fpgaD17CondTemp; ///< Reg 546. D17 Temperature - U08 fpgaD17CondReadCnt; ///< Reg 548. D17 successful read count - U08 fpgaD17CondErrorCnt; ///< Reg 549. D17 error read count - U32 fpgaD27CondDataOut; ///< Reg 550. Data read from Conductivity Sensor D27 register - U16 fpgaD27CondCond; ///< Reg 554. D27 conductivity - U16 fpgaD27CondTemp; ///< Reg 556. D27 Temperature - U08 fpgaD27CondReadCnt; ///< Reg 558. D27 successful read count - U08 fpgaD27CondErrorCnt; ///< Reg 559. D27 error read count - U32 fpgaD29CondDataOut; ///< Reg 560. Data read from Conductivity Sensor D29 register - U16 fpgaD29CondCond; ///< Reg 564. D29 conductivity - U16 fpgaD29CondTemp; ///< Reg 566. D29 Temperature - U08 fpgaD29CondReadCnt; ///< Reg 568. D29 successful read count - U08 fpgaD29CondErrorCnt; ///< Reg 569. D29 error read count - U32 fpgaD43CondDataOut; ///< Reg 570. Data read from Conductivity Sensor D43 register - U16 fpgaD43CondCond; ///< Reg 574. D43 conductivity - U16 fpgaD43CondTemp; ///< Reg 576. D43 Temperature - U08 fpgaD43CondReadCnt; ///< Reg 578. D43 successful read count - U08 fpgaD43CondErrorCnt; ///< Reg 579. D43 error read count - U16 fpgaD63LevelSensor; ///< Reg 580. Upper level Sensor - U16 fpgaD46LevelSensor; ///< Reg 582. Level Sensor 2 - U08 fpgaHallSensInputs; ///< Reg 584. Hall sensor Inputs - U08 fpgaD42TxFIFOCnt; ///< Reg 585. Blood leak sensor transmit FIFO count - U16 fpgaD42RxErrorCnt; ///< Reg 586. Blood leak sensor Receive error count - U16 fpgaD42RxFIFOCnt; ///< Reg 588. Blood leak sensor Receive FIFO count - U08 fpgaD42RxFIFODataOut; ///< Reg 590. Blood leak sensor Receive data - U08 fpgaD42PulseStatus; ///< Reg 591. Blood leak sensor status - U16 fpgaValveStates; ///< Reg 592. Valve status read - U16 fpgaValvePWMEnableStates; ///< Reg 594. Valve PWM Enable status read - U08 fpgaValveBCStates; ///< Reg 596. Balancing chamber Valves states - U08 fpgaValveBCPWMStates; ///< Reg 597. Balancing Chamber Valve PWM states - U08 fpgaValveSpStates; ///< Reg 598. DD Spare Valves states - U08 fpgaValveSpPWMStates; ///< Reg 599. Spare Valves PWM states - U08 fpgaD11_D10_PumpFault; ///< Reg 600. Concentrate pump fault register for D11_Pump and D10_Pump - U08 fpgaRTDCountErrorCycles; ///< Reg 601. Count of each incomplete seq of reads from RTD ADC. - U16 fpga_UnUsed_4; ///< Reg 602. Not Used - U16 fpga_UnUsed_5; ///< Reg 604. Not Used - U32 fpgaD78Temp; ///< Reg 606. Outlet heat exchanger temperature - U32 fpgaD1Temp; ///< Reg 610. Inlet heat exchanger temperature - U32 fpgaD4Temp; ///< Reg 614. Hydraulics primary heater temperature - U32 fpgaD50Temp; ///< Reg 618. Trimmer heater temperature - U16 fpgaD98LevelSensor; ///< Reg 622. Lower level Sensor - U16 fpgaD12MeasuredSpeed; ///< Reg 624. Fresh dialysate pump measured speed - U16 fpgaD48MeasuredSpeed; ///< Reg 626. Spent dialysate pump measured speed - U08 fpgaRTDReadCnt; ///< Reg 628. Read count for all RTD sensors - U08 fpgaD12D48PumpStatus; ///< Reg 629. Dialysate pumps Error status - U16 fpgaD12CurrentFeedback; ///< Reg 630. Fresh dialysate pump current feedback - U16 fpgaD48CurrentFeedback; ///< Reg 632. Spent dialysate pump current feedback - U08 fpgaD12HallStatus; ///< Reg 634. Fresh dialysate pump hall sensor direction status - U08 fpgaD48HallStatus; ///< Reg 635. Spent dialysate pump hall sensor direction status - U08 fpgaD6FloaterStatus; ///< Reg 636. Floater 1 level sensor status - U08 fpgaFloater2Status; ///< Reg 637. Floater 2 level sensor status - U16 fpgaD11PumpStepCountStatus; ///< Reg 638. Acid concentrate pump revolution down count status - U16 fpgaD10PumpStepCountStatus; ///< Reg 640. Bicarb concentrate pump revolution down count status - U16 fpgaAdcTemp; ///< Reg 642. TBD - U16 fpgaAdcVccInt; ///< Reg 644. TBD - U16 fpgaAdcVccAux; ///< Reg 646. TBD - U16 fpgaAdcVpVn; ///< Reg 648. TBD - U16 fpgaD12PumpSpeedFeedback; ///< Reg 650. D12 Pump speed feedback - U16 fpgaD48PumpSpeedFeedback; ///< Reg 652. D48 Pump Speed feedback - U16 fpga_UnUsed_6; ///< Reg 654. Not used - U16 fpgaD76PumpStepCountStatus; ///< Reg 656. UF pump revolution down count status - U08 fpgaD76PumpFault; ///< Reg 658: UF pump fault - U08 fpga_UnUsed_3; ///< Reg 659: Not used + U16 fpgaD63LevelSensor; ///< Reg 540. Upper level Sensor + U16 fpgaD46LevelSensor; ///< Reg 542. Level Sensor 2 + U08 fpgaHallSensInputs; ///< Reg 544. Hall sensor Inputs + U08 fpgaD42TxFIFOCnt; ///< Reg 545. Blood leak sensor transmit FIFO count + U16 fpgaD42RxErrorCnt; ///< Reg 546. Blood leak sensor Receive error count + U16 fpgaD42RxFIFOCnt; ///< Reg 548. Blood leak sensor Receive FIFO count + U08 fpgaD42RxFIFODataOut; ///< Reg 550. Blood leak sensor Receive data + U08 fpgaD42PulseStatus; ///< Reg 551. Blood leak sensor status + U16 fpgaValveStates; ///< Reg 552. Valve status read + U16 fpgaValvePWMEnableStates; ///< Reg 554. Valve PWM Enable status read + U08 fpgaValveBCStates; ///< Reg 556. Balancing chamber Valves states + U08 fpgaValveBCPWMStates; ///< Reg 557. Balancing Chamber Valve PWM states + U08 fpgaValveSpStates; ///< Reg 558. DD Spare Valves states + U08 fpgaValveSpPWMStates; ///< Reg 559. Spare Valves PWM states + U08 fpgaD11_D10_PumpFault; ///< Reg 560. Concentrate pump fault register for D11_Pump and D10_Pump + U08 fpgaD78D1D4D50ErrorCounter; ///< Reg 561. Count of each incomplete seq of reads from RTD ADC. + U16 fpga_UnUsed_1; ///< Reg 562. Concentrate pump D11_Pump hall sensor pulse width + U16 fpga_UnUsed_2; ///< Reg 564. Concentrate pump D10_Pump hall sensor pulse width + U32 fpgaD78Temp; ///< Reg 566. Outlet heat exchanger temperature + U32 fpgaD1Temp; ///< Reg 570. Inlet heat exchanger temperature + U32 fpgaD4Temp; ///< Reg 574. Hydraulics primary heater temperature + U32 fpgaD50Temp; ///< Reg 578. Trimmer heater temperature + U16 fpgaD98LevelSensor; ///< Reg 582. Lower level Sensor + U16 fpgaD12MeasuredSpeed; ///< Reg 584. Fresh dialysate pump measured speed + U16 fpgaD48MeasuredSpeed; ///< Reg 586. Spent dialysate pump measured speed + U08 fpgaRTDReadCnt; ///< Reg 588. Read count for all RTD sensors + U08 fpgaD12D48PumpStatus; ///< Reg 589. Dialysate pumps Error status + U16 fpgaD12CurrentFeedback; ///< Reg 590. Fresh dialysate pump current feedback + U16 fpgaD48CurrentFeedback; ///< Reg 592. Spent dialysate pump current feedback + U08 fpgaD12HallStatus; ///< Reg 594. Fresh dialysate pump hall sensor direction status + U08 fpgaD48HallStatus; ///< Reg 595. Spent dialysate pump hall sensor direction status + U08 fpgaD6FloaterStatus; ///< Reg 596. Floater 1 level sensor status + U08 fpgaFloater2Status; ///< Reg 597. Floater 2 level sensor status + U16 fpgaD11PumpStepCountStatus; ///< Reg 598. Acid concentrate pump revolution down count status + U16 fpgaD10PumpStepCountStatus; ///< Reg 600. Bicarb concentrate pump revolution down count status + U16 fpgaAdcTemp; ///< Reg 602. TBD + U16 fpgaAdcVccInt; ///< Reg 604. TBD + U16 fpgaAdcVccAux; ///< Reg 606. TBD + U16 fpgaAdcVpVn; ///< Reg 608. TBD + U16 fpgaD12PumpSpeedFeedback; ///< Reg 610. D12 Pump speed feedback + U16 fpgaD48PumpSpeedFeedback; ///< Reg 612. D48 Pump Speed feedback + U16 fpga_UnUsed_3; ///< Reg 614. UF D76_Pump hall sensor pulse width + U16 fpgaD76PumpStepCountStatus; ///< Reg 616. UF pump revolution down count status + U08 fpgaD76PumpFault; ///< Reg 618: UF pump fault + U08 fpga_UnUsed_4; ///< Reg 619: Not used + S16 pressureP46; ///< Reg 620. P46 pressure data. + U16 temperatureP46; ///< Reg 622. P46 temperature data. + S16 pressureM3; ///< Reg 624. M3 pressure data. + U16 temperatureM3; ///< Reg 626. M3 temperature data. + S16 pressureP8; ///< Reg 628. P8 pressure data. + U16 temperatureP8; ///< Reg 630. P8 temperature data. + S16 pressureP13; ///< Reg 632. P13 pressure data. + U16 temperatureP13; ///< Reg 634. P13 temperature data. + S16 pressureP17; ///< Reg 636. P17 pressure data. + U16 temperatureP17; ///< Reg 638. P17 temperature data. + U16 p40PumpTachCount; ///< Reg 640. P40 pump tachometer counter. + U08 p25LevelSwitch; ///< Reg 642. P25 level switch. + U08 fpga_UnUsed_5; ///< Reg 643. Reserved. + U16 flowRateP7; ///< Reg 644. P7 flow sensor rate. + U16 flowTempP7; ///< Reg 646. P7 flow sensor temperature. + U16 p12PumpTachCount; ///< Reg 648. P12 pump tachometer counter. + U16 d79SpeedPulseWidth; ///< Reg 650. D79 pusle width feedback. + U16 flowIntTempP7; ///< Reg 652. P7 flow sensor internal temperature. + U08 valveIOControlReadback; ///< Reg 654. IO Valve control bits read back. + U08 valveFPControlReadback; ///< Reg 655. FP Valve control enable read back. + U08 valveIOPWMEnableReadback; ///< Reg 656. IO Valve PWM enable read back. + U08 valveFPPWMEnableReadback; ///< Reg 657. FP Valve PWM enable read back. + U16 p12PumpPWMReadback; ///< Reg 658. P12 pump PWM read back. + U16 p40PumpPWMReadback; ///< Reg 660. P40 pump PWM read back. + U08 p7flowReadCount; ///< Reg 662. P7 Flow sensor read counter. + U08 p7flowErrorCount; ///< Reg 663. P7 Flow sensor error counter. + U16 fpgaD87PresPressure; ///< Reg 664. D87 MPM pressure sensor RAW pressure data + U16 fpgaD87PresTemp; ///< Reg 666. D87 MPM pressure sensor RAW temperature data + U32 fpgaD99Temp; ///< Reg 668. D99 temperature sensor + U32 fpga_UnUsed_6; ///< Reg 672. eserved. + U32 fpga_UnUsed_7; ///< Reg 676. Reserved. + U08 ad7124errcnt; ///< Reg 680. Counter which increments when an invalid transaction happen between FPGA and AD7124. + U08 ad7124readcnt; ///< Reg 681. Counter which increments when a valid transaction happens between FPGA and AD7124. + U16 flowRateP16; ///< Reg 682. P16 flow sensor rate. + U16 flowTempP16; ///< Reg 684. P16 flow sensor temperature. + U16 flowIntTempP16; ///< Reg 686. P16 flow sensor internal temperature. + U08 p16flowReadCount; ///< Reg 688. P16 Flow sensor read counter. + U08 p16flowErrorCount; ///< Reg 689. P16 Flow sensor error counter. + U32 d11HallSense; ///< Reg 690. D11 Pump hall sensor optical sensor interface pulse width. + U32 d10HallSense; ///< Reg 694. D10 Pump hall sensor optical sensor interface pulse width. + U32 d76HallSense; ///< Reg 698. D76 Pump hall sensor optical sensor interface pulse width. + U32 d17CondCalData; ///< Reg 702. D16 Cal Word - Holds current word being read from cal memory. + U32 d17CondCond; ///< Reg 706. D16 Conductivity Measurement. + U32 d17CondTemp; ///< Reg 710. D16 Temperature Measurement. + U08 d17CondCondReadCount; ///< Reg 714. D16 Conductivity successful read count. + U08 d17CondCondErrorCount; ///< Reg 715. D16 Conductivity unsuccessful error count. + U08 d17CondTempReadCount; ///< Reg 716. D16 Temperature successful read count. + U08 d17CondTempErrorCount; ///< Reg 717. D16 Temperature unsuccessful error count. + U08 d17CondMemCounter; ///< Reg 718. D16 Cal memory counter that keeps track of which cal word. + U08 d74CondMemCounter; ///< Reg 719. D74 Cal memory counter that keeps track of which cal word. + U32 d74CondCalData; ///< Reg 720. D74 Cal Word - Holds current word being read from cal memory. + U32 d74CondCond; ///< Reg 724. D74 Conductivity Measurement. + U32 d74CondTemp; ///< Reg 728. D74 Temperature Measurement. + U08 d74CondCondReadCount; ///< Reg 732. D74 Conductivity successful read count. + U08 d74CondCondErrorCount; ///< Reg 733. D74 Conductivity unsuccessful error count. + U08 d74CondTempReadCount; ///< Reg 734. D74 Temperature successful read count. + U08 d74CondTempErrorCount; ///< Reg 735. D74 Temperature unsuccessful error count. + U32 d27CondCalData; ///< Reg 736. D27 Cal Word - Holds current word being read from cal memory. + U32 d27CondCond; ///< Reg 740. D27 Conductivity Measurement. + U32 d27CondTemp; ///< Reg 744. D27 Temperature Measurement. + U08 d27CondCondReadCount; ///< Reg 748. D27 Conductivity successful read count. + U08 d27CondCondErrorCount; ///< Reg 749. D27 Conductivity unsuccessful error count. + U08 d27CondTempReadCount; ///< Reg 750. D27 Temperature successful read count. + U08 d27CondTempErrorCount; ///< Reg 751. D27 Temperature unsuccessful error count. + U08 d27CondMemCounter; ///< Reg 752. D27 Cal memory counter that keeps track of which cal word. + U08 d29CondMemCounter; ///< Reg 753. D29 Cal memory counter that keeps track of which cal word. + U32 d29CondCalData; ///< Reg 754. D29 Cal Word - Holds current word being read from cal memory. + U32 d29CondCond; ///< Reg 758. D29 Conductivity Measurement. + U32 d29CondTemp; ///< Reg 762. D29 Temperature Measurement. + U08 d29CondCondReadCount; ///< Reg 766. D29 Conductivity successful read count. + U08 d29CondCondErrorCount; ///< Reg 767. D29 Conductivity unsuccessful error count. + U08 d29CondTempReadCount; ///< Reg 768. D29 Temperature successful read count. + U08 d29CondTempErrorCount; ///< Reg 769. D29 Temperature unsuccessful error count. + U32 d43CondCalData; ///< Reg 770. D43 Cal Word - Holds current word being read from cal memory. + U32 d43CondCond; ///< Reg 774. D43 Conductivity Measurement. + U32 d43CondTemp; ///< Reg 778. D43 Temperature Measurement. + U08 d43CondCondReadCount; ///< Reg 782. D43 Conductivity successful read count. + U08 d43CondCondErrorCount; ///< Reg 783. D43 Conductivity unsuccessful error count. + U08 d43CondTempReadCount; ///< Reg 784. D43 Temperature successful read count. + U08 d43CondTempErrorCount; ///< Reg 785. D43 Temperature unsuccessful error count. + U08 d43CondMemCounter; ///< Reg 786. D43 Cal memory counter that keeps track of which cal word. + U08 p9CondMemCounter; ///< Reg 787. P9 Cal memory counter that keeps track of which cal word. + U32 p9CondCalData; ///< Reg 788. P9 Cal Word - Holds current word being read from cal memory. + U32 p9CondCond; ///< Reg 792. P9 Conductivity Measurement. + U32 p9CondTemp; ///< Reg 796. P9 Temperature Measurement. + U08 p9CondCondReadCount; ///< Reg 800. P9 Conductivity successful read count. + U08 p9CondCondErrorCount; ///< Reg 801. P9 Conductivity unsuccessful error count. + U08 p9CondTempReadCount; ///< Reg 802. P9 Temperature successful read count. + U08 p9CondTempErrorCount; ///< Reg 803. P9 Temperature unsuccessful error count. + U32 p18CondCalData; ///< Reg 804. P18 Cal Word - Holds current word being read from cal memory. + U32 p18CondCond; ///< Reg 808. P18 Conductivity Measurement. + U32 p18CondTemp; ///< Reg 812. P18 Temperature Measurement. + U08 p18CondCondReadCount; ///< Reg 816. P18 Conductivity successful read count. + U08 p18CondCondErrorCount; ///< Reg 817. P18 Conductivity unsuccessful error count. + U08 p18CondTempReadCount; ///< Reg 818. P18 Temperature successful read count. + U08 p18CondTempErrorCount; ///< Reg 819. P18 Temperature unsuccessful error count. + U08 p18CondMemCounter; ///< Reg 820. P18 Cal memory counter that keeps track of which cal word. - S16 pressureP46; ///< Reg 660. P46 pressure data. - U16 temperatureP46; ///< Reg 662. P46 temperature data. - S16 pressureM3; ///< Reg 664. M3 pressure data. - U16 temperatureM3; ///< Reg 666. M3 temperature data. - S16 pressureP8; ///< Reg 668. P8 pressure data. - U16 temperatureP8; ///< Reg 670. P8 temperature data. - S16 pressureP13; ///< Reg 672. P13 pressure data. - U16 temperatureP13; ///< Reg 674. P13 temperature data. - S16 pressureP17; ///< Reg 676. P17 pressure data. - U16 temperatureP17; ///< Reg 678. P17 temperature data. - U16 p40PumpTachCount; ///< Reg 680. P40 pump tachometer counter. - U08 p25LevelSwitch; ///< Reg 682. P25 level switch. - U08 reserved4; ///< Reg 683. Reserved. - U32 conductivityP9Data; ///< Reg 684. P9 conductivity sensor data. - U16 conductivityP9Cond; ///< Reg 688. P9 conductivity sensor conductivity. - U16 conductivityP9Temp; ///< Reg 690. P9 conductivity sensor temperature. - U08 conductivityP9ReadCount; ///< Reg 692. P9 conductivity sensor read counter. - U08 conductivityP9ErrorCount; ///< Reg 693. P9 conductivity sensor error counter. - U32 conductivityP18Data; ///< Reg 694. P18 conductivity sensor data. - U16 conductivityP18Cond; ///< Reg 698. P18 conductivity sensor conductivity. - U16 conductivityP18Temp; ///< Reg 700. P18 conductivity sensor temperature. - U08 conductivityP18ReadCount; ///< Reg 702. P18 conductivity sensor read counter. - U08 conductivityP18ErrorCount; ///< Reg 703. P18 conductivity sensor error counter. - U16 flowRateP7; ///< Reg 704. P7 flow sensor rate. - U16 flowTempP7; ///< Reg 706. P7 flow sensor temperature. - U16 p12PumpTachCount; ///< Reg 708. P12 pump tachometer counter. - U16 d79SpeedPulseWidth; ///< Reg 710. D79 pusle width feedback. - U16 flowIntTempP7; ///< Reg 712. P7 flow sensor internal temperature. - U08 valveIOControlReadback; ///< Reg 714. IO Valve control bits read back. - U08 valveFPControlReadback; ///< Reg 715. FP Valve control enable read back. - U08 valveIOPWMEnableReadback; ///< Reg 714. IO Valve PWM enable read back. - U08 valveFPPWMEnableReadback; ///< Reg 715. FP Valve PWM enable read back. - U16 p12PumpPWMReadback; ///< Reg 718. P12 pump PWM read back. - U16 p40PumpPWMReadback; ///< Reg 720. P40 pump PWM read back. - U08 p7flowReadCount; ///< Reg 722. P7 Flow sensor read counter. - U08 p7flowErrorCount; ///< Reg 723. P7 Flow sensor error counter. - U16 fpgaD87PresPressure; ///< Reg 724. D87 MPM pressure sensor RAW pressure data - U16 fpgaD87PresTemp; ///< Reg 726. D87 MPM pressure sensor RAW temperature data - U32 fpgaD99Temp; ///< Reg 728. D99 temperature sensor - U32 tempTax1; ///< Reg 732. ( Tax1 ) temperature sensor reading. - U32 tempRTD; ///< Reg 736. spare temperature sensor reading. - U08 ad7124errcnt; ///< Reg 740. Counter which increments when an invalid transaction happen between FPGA and AD7124. - U08 ad7124readcnt; ///< Reg 741. Counter which increments when a valid transaction happens between FPGA and AD7124. - U16 flowRateP16; ///< Reg 742. P16 flow sensor rate. - U16 flowTempP16; ///< Reg 744. P16 flow sensor temperature. - U16 flowIntTempP16; ///< Reg 746. P16 flow sensor internal temperature. - U08 p16flowReadCount; ///< Reg 748. P16 Flow sensor read counter. - U08 p16flowErrorCount; ///< Reg 749. P16 Flow sensor error counter. - - U32 fpgaD74CondDataOut; ///< Reg 750. Data read from Conductivity Sensor D74 register - U16 fpgaD74CondCond; ///< Reg 754. D74 conductivity - U16 fpgaD74CondTemp; ///< Reg 756. D74 Temperature - U08 fpgaD74CondReadCnt; ///< Reg 758. D74 successful read count - U08 fpgaD74CondErrorCnt; ///< Reg 759. D74 error read count - U32 fpgaD11PumpHallSense; ///< Reg 760. Concentrate pump D11_Pump hall sensor pulse width - U32 fpgaD10PumpHallSense; ///< Reg 764. Concentrate pump D10_Pump hall sensor pulse width - U32 fpgaD76PumpHallSense; ///< Reg 768. UF D76_Pump hall sensor pulse width - U32 fpgaTestBytes; ///< Reg 772. FPGA Test 4 bytes } DD_FPGA_SENSORS_T; typedef struct @@ -279,76 +298,58 @@ U08 fpgaBCValvePWMControl; ///< Reg 15. Balancing Chamber Valves PWM control U08 fpgaDDSpareValveControl; ///< Reg 16. Spare Valves Control Registers U08 fpgaDDSpareValvePWMControl; ///< Reg 17. Spare Valves PWM control - U08 fpgaConSensD17D74Control; ///< Reg 18. Conductivity/Temperature Sensors D17 & D74 Control registers - U08 fpgaConSensD27D29Control; ///< Reg 19. Conductivity/Temperature Sensors D27 & D29 Control registers - U16 fpgaConSensD17D74_Addrs; ///< Reg 20. D17,D74 Initialization Address register - U32 fpgaConSensD17D74_Data_In; ///< Reg 22. D17,D74 Initialization data register - U16 fpgaConSensD27D29_Addrs; ///< Reg 26. D27,D29 Initialization Address register - U32 fpgaConSensD27D29_Data_In; ///< Reg 28. D27,D29 Initialization data register - U16 fpgaRemoteUpdate_Write; ///< Reg 32.Register for Remote update used by SW. - U16 fpgaD12PumpSpeed; ///< Reg 34. D48 Speed/RPM Control - U08 fpgaD12PumpControl; ///< Reg 36. DGP Control - U08 fpgaD48PumpControl; ///< Reg 37. SDP Control - U16 fpgaD48PumpSpeed; ///< Reg 38. SDP Speed/RPM Control - U16 fpgaNotUsed_1; ///< Reg 40. Not used - U08 fpgaD11PumpControl; ///< Reg 42. Acid Concentrate Pump Control - U08 fpgaD10PumpControl; ///< Reg 43. BiCarb Concentrate Pump Control - U16 fpgaNotUsed_2; ///< Reg 44. Not used - U08 fpgaD42SensorTest; ///< Reg 46. Blood leak sensor test - U08 fpgaD42UARTControl; ///< Reg 47. Blood leak sensor UART control - U08 fpgaD42FIFOTx; ///< Reg 48. Blood leak sensor FIFO transmit control - U08 fpgaD5HeaterPWMControl; ///< Reg 49. Primary heater PWM control - U08 fpgaD45HeaterPWMControl; ///< Reg 50. Trimmer heater PWM control - U08 fpgaD79PWMPumpCtl; ///< Reg 51. Rinse pump PWM control - U16 fpgaVBCPWMLow; ///< Reg 52. VBC PWM low ( Balancing chamber valves) - U16 fpgaVBCPWMPeriod; ///< Reg 54. VBC PWM period - U16 fpgaVBCPWMPullIn; ///< Reg 56. VBC PWM pull in - U16 fpgaVSPPWMLow; ///< Reg 58. VSP PWM low ( Spare valves ) - U16 fpgaVSPPWMPeriod; ///< Reg 60. VSP PWM period - U16 fpgaVSPPWMPullIn; ///< Reg 62. VSP PWM pull in - U16 fpgaD11PumpRevCount; ///< Reg 64. Acid Concentrate pump revolution count - U16 fpgaD10PumpRevCount; ///< Reg 66. Bicarb Concentrate pump revolution count - U08 fpgaADCControl; ///< Reg 68. FPGA internal ADC Control register for debugging - U08 fpgaGPIOControl; ///< Reg 69. FPGA GPIO control interface - U16 fpgaACRelayPWMLow; ///< Reg 70. Length of time in 10us resoultion that PWM output stays low. - U16 fpgaACRelayPWMPeriod; ///< Reg 72. PWM period for AC relay/heater. - U16 fpgaNotUsed_3; ///< Reg 74. Not Used - U16 fpgaD76PumpRevCount; ///< Reg 76. UF pump revolution count - U08 fpgaD76PumpControl; ///< Reg 78. UF Pump Control + U16 fpgaRemoteUpdate_Write; ///< Reg 18. Register for Remote update used by SW. + U16 fpgaD12PumpSpeed; ///< Reg 20. D48 Speed/RPM Control + U08 fpgaD12PumpControl; ///< Reg 22. DGP Control + U08 fpgaD48PumpControl; ///< Reg 23. SDP Control + U16 fpgaD48PumpSpeed; ///< Reg 24. SDP Speed/RPM Control + U08 fpgaD11PumpControl; ///< Reg 28. Acid Concentrate Pump Control + U08 fpgaD10PumpControl; ///< Reg 29. BiCarb Concentrate Pump Control + U08 fpgaD42SensorTest; ///< Reg 32. Blood leak sensor test + U08 fpgaD42UARTControl; ///< Reg 33. Blood leak sensor UART control + U08 fpgaD42FIFOTx; ///< Reg 34. Blood leak sensor FIFO transmit control + U08 fpgaD5HeaterPWMControl; ///< Reg 35. Primary heater PWM control + U08 fpgaD45HeaterPWMControl; ///< Reg 36. Trimmer heater PWM control + U08 fpgaD79PWMPumpCtl; ///< Reg 37. Rinse pump PWM control + U16 fpgaVBCPWMLow; ///< Reg 38. VBC PWM low ( Balancing chamber valves) + U16 fpgaVBCPWMPeriod; ///< Reg 40. VBC PWM period + U16 fpgaVBCPWMPullIn; ///< Reg 42. VBC PWM pull in + U16 fpgaVSPPWMLow; ///< Reg 44. VSP PWM low ( Spare valves ) + U16 fpgaVSPPWMPeriod; ///< Reg 46. VSP PWM period + U16 fpgaVSPPWMPullIn; ///< Reg 48. VSP PWM pull in + U16 fpgaD11PumpRevCount; ///< Reg 50. Acid Concentrate pump revolution count + U16 fpgaD10PumpRevCount; ///< Reg 52. Bicarb Concentrate pump revolution count + U08 fpgaADCControl; ///< Reg 54. FPGA internal ADC Control register for debugging + U08 fpgaGPIOControl; ///< Reg 55. FPGA GPIO control interface + U16 fpgaACRelayPWMLow; ///< Reg 56. Length of time in 10us resoultion that PWM output stays low. + U16 fpgaACRelayPWMPeriod; ///< Reg 58. PWM period for AC relay/heater. + U16 reserved1; ///< Reg 60. Reserved + U16 fpgaD76PumpRevCount; ///< Reg 62. UF pump revolution count + U08 fpgaD76PumpControl; ///< Reg 64. UF Pump Control + U08 reserved2; ///< Reg 65. Reserved + U08 valveIOControl; ///< Reg 66. IO Valve control register. + U08 valveFPControl; ///< Reg 67. FP Valve control register. + U16 descalePumpSpeed; ///< Reg 68. Descaler pump speed register. + U08 descalePumpControl; ///< Reg 70. Descaler pump control register. + U08 p12PumpControl; ///< Reg 71. P12 pump control register. + U16 valveIOFPPWMLow; ///< Reg 72. Valve VWi PWM low pulse period in 0.1 uSec. + U16 valveIOFPPWMPeriod; ///< Reg 74. Valve VWi PWM full period in 0.1 uSec. + U16 valveIOFPPWMPullIn; ///< Reg 76. Valve PWM high pulse period when valve is on in 0.1 uSec. + U16 p12PumpPWMDutyCyclePct; ///< Reg 78. P12 pump PWM duty cycle in percentage. + U16 p40PumpPWMDutyCyclePct; ///< Reg 80. P40 pump PWM duty cycle in percentage. + U08 p40PumpControl; ///< Reg 82. P40 pump control register. + U08 reserved3; ///< Reg 83. Reserved. + U08 flowControlp7; ///< Reg 84. P7 AVS Romer flow sensor control register. + U08 flowAddressp7; ///< Reg 85. P7 AVS Romer flow sensor I2C slave address register. + U08 valveIOPWMEnable; ///< Reg 86. Valve IO PWM enable register. + U08 valveFPPWMEnable; ///< Reg 87. Valve FP PWM enable register. + U08 flowControlp16; ///< Reg 88. P16 AVS Romer flow sensor control register. + U08 flowAddressp16; ///< Reg 89. P16 AVS Romer flow sensor I2C slave address register. + U08 reserved4; ///< Reg 90. Reserved. + U32 fpgaD11PumpSpeed; ///< Reg 92. Acid Concentrate Pump Speed/RPM Control + U32 fpgaD10PumpSpeed; ///< Reg 94. BiCarb Concentrate Pump Speed/RPM Control + U32 fpgaD76PumpSpeed; ///< Reg 96. UF Pump Speed/RPM Control - U08 notused; ///< Reg 79. Not used - U08 valveIOControl; ///< Reg 80. IO Valve control register. - U08 valveFPControl; ///< Reg 81. FP Valve control register. - U08 conductivityP9Control; ///< Reg 82. P9 conductivity control register. - U08 conductivityP18Control; ///< Reg 83. P18 conductivity control register. - U16 conductivityP9Address; ///< Reg 84. P9 conductivity address register. - U32 conductivityP9Data; ///< Reg 86. P9 conductivity data in register. - U16 conductivityP18Address; ///< Reg 90. P18 conductivity address register. - U32 conductivityP18Data; ///< Reg 92. P18 conductivity data in register. - U16 descalePumpSpeed; ///< Reg 96. Descaler pump speed register. - U08 descalePumpControl; ///< Reg 98. Descaler pump control register. - U08 p12PumpControl; ///< Reg 99. P12 pump control register. - U16 valveIOFPPWMLow; ///< Reg 100. Valve VWi PWM low pulse period in 0.1 uSec. - U16 valveIOFPPWMPeriod; ///< Reg 102. Valve VWi PWM full period in 0.1 uSec. - U16 valveIOFPPWMPullIn; ///< Reg 104. Valve PWM high pulse period when valve is on in 0.1 uSec. - U16 p12PumpPWMDutyCyclePct; ///< Reg 106. P12 pump PWM duty cycle in percentage. - U16 p40PumpPWMDutyCyclePct; ///< Reg 108. P40 pump PWM duty cycle in percentage. - U08 p40PumpControl; ///< Reg 110. P40 pump control register. - U08 reserved1; ///< Reg 111. Reserved. - U08 flowControlp7; ///< Reg 112. P7 AVS Romer flow sensor control register. - U08 flowAddressp7; ///< Reg 113. P7 AVS Romer flow sensor I2C slave address register. - U08 valveIOPWMEnable; ///< Reg 114. Valve IO PWM enable register. - U08 valveFPPWMEnable; ///< Reg 115. Valve FP PWM enable register. - U08 flowControlp16; ///< Reg 116. P16 AVS Romer flow sensor control register. - U08 flowAddressp16; ///< Reg 117. P16 AVS Romer flow sensor I2C slave address register. - - U08 fpgaConSensD43Control; ///< Reg 118. Conductivity/Temperature Sensors D43 Control registers - U16 fpgaConSensD43_Addrs; ///< Reg 119. D43 Initialization Address register - U32 fpgaConSensD43_Data_In; ///< Reg 121. D43 Initialization data register - U08 fpgaNotUsed_4; ///< Reg 125. Not used - U32 fpgaD11PumpSpeed; ///< Reg 126. Acid Concentrate Pump Speed/RPM Control - U32 fpgaD10PumpSpeed; ///< Reg 130. BiCarb Concentrate Pump Speed/RPM Control - U32 fpgaD76PumpSpeed; ///< Reg 134. UF Pump Speed/RPM Control } FPGA_ACTUATORS_T; #pragma pack(pop) @@ -850,7 +851,7 @@ * @param stepSpeed The concentrate pump step speed period * @return none *************************************************************************/ -void setFPGAD11PumpSetStepSpeed( U32 stepSpeed ) +void setFPGAD11PumpSetStepSpeed( U16 stepSpeed ) { fpgaActuatorSetPoints.fpgaD11PumpSpeed = stepSpeed; } @@ -864,7 +865,7 @@ * @param stepSpeed The concentrate pump step speed period * @return none *************************************************************************/ -void setFPGAD10PumpSetStepSpeed( U32 stepSpeed ) +void setFPGAD10PumpSetStepSpeed( U16 stepSpeed ) { fpgaActuatorSetPoints.fpgaD10PumpSpeed = stepSpeed; } @@ -878,7 +879,7 @@ * @param stepSpeed The concentrate pump step speed period * @return none *************************************************************************/ -void setFPGAD76PumpSetStepSpeed( U32 stepSpeed ) +void setFPGAD76PumpSetStepSpeed( U16 stepSpeed ) { fpgaActuatorSetPoints.fpgaD76PumpSpeed = stepSpeed; } @@ -1492,7 +1493,7 @@ * @details \b Outputs: none * @return concentrate pump D11_Pump hall sense pulse width *************************************************************************/ -U32 getFPGAD11PumpHallSensePulseWidth( void ) +U16 getFPGAD11PumpHallSensePulseWidth( void ) { return fpgaSensorReadings.d11HallSense; } @@ -1505,7 +1506,7 @@ * @details \b Outputs: none * @return concentrate pump D10_Pump hall sense pulse width *************************************************************************/ -U32 getFPGAD10PumpHallSensePulseWidth( void ) +U16 getFPGAD10PumpHallSensePulseWidth( void ) { return fpgaSensorReadings.d10HallSense; } @@ -1518,7 +1519,7 @@ * @details \b Outputs: none * @return ultrafiltration pump D76_Pump hall sense pulse width *************************************************************************/ -U32 getFPGAD76PumpHallSensePulseWidth( void ) +U16 getFPGAD76PumpHallSensePulseWidth( void ) { return fpgaSensorReadings.d76HallSense; } Index: firmware/App/Services/FpgaDD.h =================================================================== diff -u -r1c4e2ce92ecb2e4b4301aba7bd2b869f1116d0f6 -r5d60262836ddc8f80ac98f07f2cfd6707a5b7b79 --- firmware/App/Services/FpgaDD.h (.../FpgaDD.h) (revision 1c4e2ce92ecb2e4b4301aba7bd2b869f1116d0f6) +++ firmware/App/Services/FpgaDD.h (.../FpgaDD.h) (revision 5d60262836ddc8f80ac98f07f2cfd6707a5b7b79) @@ -7,8 +7,8 @@ * * @file FpgaDD.h * -* @author (last) Vinayakam Mani -* @date (last) 09-Feb-2026 +* @author (last) Varshini Nagabooshanam +* @date (last) 27-Jan-2026 * * @author (original) Vinayakam Mani * @date (original) 26-Aug-2024 @@ -129,9 +129,9 @@ U08 getFPGAD74CalMemCounter( void ); // Pumps (Dosing and Gear pumps ) -void setFPGAD11PumpSetStepSpeed( U32 stepSpeed ); -void setFPGAD10PumpSetStepSpeed( U32 stepSpeed ); -void setFPGAD76PumpSetStepSpeed( U32 stepSpeed ); +void setFPGAD11PumpSetStepSpeed( U16 stepSpeed ); +void setFPGAD10PumpSetStepSpeed( U16 stepSpeed ); +void setFPGAD76PumpSetStepSpeed( U16 stepSpeed ); void setFPGAD11PumpControl( U08 control ); void setFPGAD10PumpControl( U08 control ); void setFPGAD76PumpControl( U08 control ); @@ -153,9 +153,9 @@ BOOL getFPGAD10PumpIsParked( void ); BOOL getFPGAD11PumpParkFault( void ); BOOL getFPGAD10PumpParkFault( void ); -U32 getFPGAD11PumpHallSensePulseWidth( void ); -U32 getFPGAD10PumpHallSensePulseWidth( void ); -U32 getFPGAD76PumpHallSensePulseWidth( void ); +U16 getFPGAD11PumpHallSensePulseWidth( void ); +U16 getFPGAD10PumpHallSensePulseWidth( void ); +U16 getFPGAD76PumpHallSensePulseWidth( void ); U16 getFPGAD11PumpRevolutionCountStatus( void ); U16 getFPGAD10PumpRevolutionCountStatus( void ); U16 getFPGAD76PumpRevolutionCountStatus( void );