Index: firmware/App/Services/FpgaTD.c =================================================================== diff -u -re7fc14ea1f82609c49bd3e82480523fe312a27f2 -ra074eec2ed7d04a1ea90072d7c9c013bf27a6e90 --- firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision e7fc14ea1f82609c49bd3e82480523fe312a27f2) +++ firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision a074eec2ed7d04a1ea90072d7c9c013bf27a6e90) @@ -48,6 +48,7 @@ #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_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. @@ -478,7 +479,8 @@ { if ( MOTOR_DIR_FORWARD == dir ) { - fpgaActuatorSetPoints.h4Control &= ~( 1 << 2 ); + // 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; } else