Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -r2e21b8a4e52e0d1f94389acf424b5033362b63f1 -r5aaca3e9292c6c7404872440fe2ebe8ac6641fb8 --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 2e21b8a4e52e0d1f94389acf424b5033362b63f1) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 5aaca3e9292c6c7404872440fe2ebe8ac6641fb8) @@ -56,7 +56,8 @@ #define BP_I_COEFFICIENT 0.00075 ///< I term for blood pump control #define BP_HOME_RATE 100 ///< Target pump speed (in estimate mL/min) for homing. -#define BP_HOME_TIMEOUT_MS 10000 ///< Maximum time allowed for homing to complete (in ms). +#define BP_HOME_TIMEOUT_MS 10000 ///< Maximum time (in ms) allowed for homing to complete. +#define BP_MAX_ROTOR_HALL_INTERVAL_MS 20000 ///< Maximum time (in ms) allowed between rotor hall sensor detects (50 mL/min worst case). /// Interval (ms/task time) at which the blood pump speed is calculated (every 40 ms). #define BP_SPEED_CALC_INTERVAL ( 40 / TASK_PRIORITY_INTERVAL ) /// Number of hall sensor counts kept in buffer to hold last 1 second of count data. @@ -76,7 +77,7 @@ /// Persist time (task intervals) motor speed error condition. static const U32 BP_MOTOR_SPEED_ERROR_PERSIST = ( 5 * MS_PER_SECOND ); /// Persist time (task intervals) rotor speed error condition. -static const U32 BP_ROTOR_SPEED_ERROR_PERSIST = ( 12 * MS_PER_SECOND ); +static const U32 BP_ROTOR_SPEED_ERROR_PERSIST = ( 22 * MS_PER_SECOND ); /// Persist time (task intervals) pump direction error condition. static const U32 BP_DIRECTION_ERROR_PERSIST = ( 250 ); /// Persist time period blood pump rotor speed too fast error condition. @@ -1033,7 +1034,7 @@ } // If pump is stopped or running very slowly, set rotor speed to zero - if ( TRUE == didTimeout( bpRotorRevStartTime, BP_HOME_TIMEOUT_MS ) ) + if ( TRUE == didTimeout( bpRotorRevStartTime, BP_MAX_ROTOR_HALL_INTERVAL_MS ) ) { bloodPumpRotorSpeedRPM.data = 0.0; }