Index: firmware/App/Services/FpgaTD.c =================================================================== diff -u -r51f42cd88bd9c50ed9096a2d1d8ff859a95aff95 -rae3240cfb3237c01472168fee0bfc6beb34e0ed9 --- firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision 51f42cd88bd9c50ed9096a2d1d8ff859a95aff95) +++ firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision ae3240cfb3237c01472168fee0bfc6beb34e0ed9) @@ -149,6 +149,8 @@ S16 ACPower3Voltage; ///< Reg 342. AC power voltage - 3. S16 H4RotorHallCount; ///< Reg 344. H4 rotor count from hall sensor. U08 H6RotorStatus; ///< Reg 346. H6 rotor status. + U08 reserved5; ///< + U16 h12Speed; ///< Reg 348. H12 speed (in RPM). } FPGA_SENSORS_T; /// Record structure for FPGA continuous priority writes. @@ -529,6 +531,21 @@ /*********************************************************************//** * @brief + * The getH6RotorStatus function gets the latest blood pump hall sensor status. + * Bit 0: 0=Magnet is detected (used for homing in forward direction) + * Bit 1: 0=Reverse pump direction detected, 1=Forward pump direction detected + * Bit 2..7: Not used. + * @details \b Inputs: fpgaSensorReadings.H6RotorStatus + * @details \b Outputs: none + * @return Latest blood pump hall sensor status bits. + *************************************************************************/ +U08 getH6RotorStatus( void ) +{ + return fpgaSensorReadings.H6RotorStatus; +} + +/*********************************************************************//** + * @brief * The getH4RotorCount function gets the latest blood pump * hall sensor count. Count is number of ms between rotor revolutions. * If direction is forward, the count will be positive. If direction is @@ -1117,7 +1134,9 @@ { if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_COMM_FAILURES ) ) { +#ifndef TEST_DEBUGGER SET_ALARM_WITH_2_U32_DATA( ALARM_ID_TD_FPGA_COMM_TIMEOUT, MAX_FPGA_COMM_FAILURES, (U32)fpgaSensorReadings.errorCountProcessor ) +#endif } } } @@ -1143,7 +1162,9 @@ { if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_COMM_FAILURES ) ) { +#ifndef TEST_DEBUGGER SET_ALARM_WITH_2_U32_DATA( ALARM_ID_TD_FPGA_COMM_TIMEOUT, MAX_FPGA_COMM_FAILURES, (U32)fpgaSensorReadings.errorCountProcessor ) +#endif } } }