Index: firmware/App/Modes/ModeTreatment.c =================================================================== diff -u -r83310420ae862de4724f8cfbbaeda9936c47801b -rd94c5324fc18b9fda9d8f0b5efcf6f60a52f3f7a --- firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision 83310420ae862de4724f8cfbbaeda9936c47801b) +++ firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision d94c5324fc18b9fda9d8f0b5efcf6f60a52f3f7a) @@ -17,6 +17,7 @@ #include "AirTrap.h" //#include "BloodFlow.h" +#include "BPModule.h" #include "Bubbles.h" #include "Buttons.h" #include "DDInterface.h" Index: firmware/App/Services/AlarmMgmtSWFaults.h =================================================================== diff -u -r8345f0415ce34f2f47afcbf613a00216769f51c6 -rd94c5324fc18b9fda9d8f0b5efcf6f60a52f3f7a --- firmware/App/Services/AlarmMgmtSWFaults.h (.../AlarmMgmtSWFaults.h) (revision 8345f0415ce34f2f47afcbf613a00216769f51c6) +++ firmware/App/Services/AlarmMgmtSWFaults.h (.../AlarmMgmtSWFaults.h) (revision d94c5324fc18b9fda9d8f0b5efcf6f60a52f3f7a) @@ -199,6 +199,9 @@ SW_FAULT_ID_PRE_TX_RECIRC_INVALID_STATE = 168, SW_FAULT_ID_TD_VALVES_INVALID_VALVE2 = 169, SW_FAULT_ID_INVALID_TUBE_SET_TYPE = 170, + SW_FAULT_ID_INVALID_MESSAGE_PAYLOAD_LENGTH = 171, + SW_FAULT_ID_TD_BP_DRIVER_STATE = 172, + SW_FAULT_ID_TD_BP_MODULE_STATE = 173, NUM_OF_SW_FAULT_IDS } SW_FAULT_ID_T; Index: firmware/App/Services/FpgaTD.c =================================================================== diff -u -r35870ad9866d25e32797343f14054eadbb234cf9 -rd94c5324fc18b9fda9d8f0b5efcf6f60a52f3f7a --- firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision 35870ad9866d25e32797343f14054eadbb234cf9) +++ firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision d94c5324fc18b9fda9d8f0b5efcf6f60a52f3f7a) @@ -7,8 +7,8 @@ * * @file FpgaTD.c * -* @author (last) Varshini Nagabooshanam -* @date (last) 15-Jun-2026 +* @author (last) Sean Nash +* @date (last) 30-Jun-2026 * * @author (original) Sean Nash * @date (original) 01-Aug-2024 @@ -46,9 +46,9 @@ #define MIN_POWER_ON_TIME_FOR_COMM_FAILS ( 1 * MS_PER_SECOND ) ///< Allow FPGA comm errors for first second after power-up #define FPGA_H4_ENABLE_BIT_MASK 0x01 ///< Bit mask for enabling the blood pump. -#define FPGA_H4_DIR_FORWARD_BIT_MASK 0x02 ///< Bit mask for setting the blood pump direction. +#define FPGA_H4_DIRECTION_A_BIT_MASK 0x02 ///< Bit mask for setting the blood pump direction A setting. +#define FPGA_H4_DIRECTION_B_BIT_MASK 0x04 ///< Bit mask for setting the blood pump direction B setting. #define FPGA_H4_BRAKE_AND_HOLD_TORQUE 0x06 ///< Bit mask for braking the blood pump while holding the torque of the pump. -#define FPGA_H4_BIT_2_INDEX 2 ///< Blood pump bit 2 index. #define FPGA_H13_OPEN_BIT_MASK 0x01 ///< Bit mask for setting H13 valve position to open. #define FPGA_H20_OPEN_BIT_MASK 0x02 ///< Bit mask for setting H20 valve position to open. @@ -499,23 +499,28 @@ * The setH4Direction function sets the direction for the blood pump * motor to the given direction. * @details \b Inputs: none - * @details \b Outputs: Blood pump motor direction is set (bit 1 and 2 of BP control register). - * 0 - CW (forward) - * 1 - CCW (reverse) + * @details \b Outputs: Blood pump motor direction is set + * (bit 1 (A) and 2 (B) of BP control register). + * AB + * 00 - Power stage enabled + * 01 - CCW (reverse) + * 10 - CW (forward) + * 11 - Braking and holding torque * @param dir the desired direction for the blood pump motor (fwd or rev) * @return none *************************************************************************/ void setH4Direction( MOTOR_DIR_T dir ) { + // This clears bit 2 for both forward and reverse directions if ( MOTOR_DIR_FORWARD == dir ) { - // First clear bit 2 if it is on otherwise the pump can be kept on brake - fpgaActuatorSetPoints.h4Control &= ~( 1 << FPGA_H4_BIT_2_INDEX ); - fpgaActuatorSetPoints.h4Control |= FPGA_H4_DIR_FORWARD_BIT_MASK; + fpgaActuatorSetPoints.h4Control &= ~FPGA_H4_DIRECTION_B_BIT_MASK; + fpgaActuatorSetPoints.h4Control |= FPGA_H4_DIRECTION_A_BIT_MASK; } else { - fpgaActuatorSetPoints.h4Control &= ~((U08)FPGA_H4_DIR_FORWARD_BIT_MASK); + fpgaActuatorSetPoints.h4Control |= FPGA_H4_DIRECTION_B_BIT_MASK; + fpgaActuatorSetPoints.h4Control &= ~((U08)FPGA_H4_DIRECTION_A_BIT_MASK); } } @@ -531,6 +536,12 @@ void setH4SetSpeed( U16 rpm ) { fpgaActuatorSetPoints.h4SetSpeed = rpm; + // if commanded speed is zero, apply brake + if ( 0 == rpm ) + { + fpgaActuatorSetPoints.h4Control |= FPGA_H4_DIRECTION_B_BIT_MASK; + fpgaActuatorSetPoints.h4Control |= FPGA_H4_DIRECTION_A_BIT_MASK; + } } /*********************************************************************//** Index: firmware/App/Services/Messaging.c =================================================================== diff -u -r83310420ae862de4724f8cfbbaeda9936c47801b -rd94c5324fc18b9fda9d8f0b5efcf6f60a52f3f7a --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision 83310420ae862de4724f8cfbbaeda9936c47801b) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision d94c5324fc18b9fda9d8f0b5efcf6f60a52f3f7a) @@ -21,6 +21,7 @@ #include "AirTrap.h" #include "AlarmMgmt.h" #include "BloodFlow.h" +#include "BPModule.h" #include "Bubbles.h" #include "Buttons.h" #include "Compatible.h" @@ -134,6 +135,7 @@ { MSG_ID_UI_ADJUST_DISPOSABLES_CONFIRM_REQUEST, &handleAutoLoadRequest }, { MSG_ID_UI_SETUP_TUBING_SET_CONNECTIONS_CONFIRM_REQUEST, &handleSetupTubingSetConnectionConfirmRequest }, { MSG_ID_UI_ADJUST_DISPOSABLES_REMOVAL_CONFIRM_REQUEST, &handleAutoEjectRequest }, + { MSG_ID_UI_BLOOD_PRESSURE_REQUEST, &bpModuleHandleVitalsRequest }, { MSG_ID_FFU_SIGNAL_TD_UPDATE_AVAILABLE, &handleUpdateAvailable }, { MSG_ID_UI_FLUID_BOLUS_REQUEST, &handleFluidBolusRequest }, { MSG_ID_TD_SOFTWARE_RESET_REQUEST, &testTDSoftwareResetRequest },