Index: firmware/App/Services/FpgaTD.c =================================================================== diff -u -rf702f87af0d8b7c1ecc7d9fb62d21989c34055ff -re242484caff1834f355524ad75febbf64b81b229 --- firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision f702f87af0d8b7c1ecc7d9fb62d21989c34055ff) +++ firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision e242484caff1834f355524ad75febbf64b81b229) @@ -484,9 +484,12 @@ * 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) + * (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 *************************************************************************/ @@ -517,6 +520,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; + } } /*********************************************************************//**