Index: firmware/App/Services/FpgaDD.c =================================================================== diff -u -rfd897db8177752330ad08d877e0a13620513dbdc -r11fcfaffab49f00f358124c8c285a821632eba24 --- firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision fd897db8177752330ad08d877e0a13620513dbdc) +++ firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 11fcfaffab49f00f358124c8c285a821632eba24) @@ -615,10 +615,12 @@ U08 fpgaConSensD43Control; ///< Reg 118. Conductivity/Temperature Sensors D43 Control registers U16 fpgaConSensD43_Addrs; ///< Reg 119. D43 Initialization Address register U32 fpgaConSensD43_Data_In; ///< Reg 121. D43 Initialization data register - U08 unusedRegister3; ///< Reg 125. Unused register 3 + U08 fpgaD92PumpControl; ///< Reg 125. D92 HDF Pump Control U32 fpgaD11PumpSpeed; ///< Reg 126. Acid Concentrate Pump Speed/RPM Control U32 fpgaD10PumpSpeed; ///< Reg 130. BiCarb Concentrate Pump Speed/RPM Control U32 fpgaD76PumpSpeed; ///< Reg 134. UF Pump Speed/RPM Control + U32 fpgaD92PumpSpeed; ///< Reg 138. HDF Pump Speed/RPM Control + U32 fpgaD92PumpRevCount; ///< Reg 142. HDF pump revolution count } FPGA_ACTUATORS_T; #pragma pack(pop) @@ -1107,6 +1109,7 @@ SET_FPGA_ACTUATOR_FIELD( fpgaD12PumpSpeed, currentSpeed ); } + /*********************************************************************//** * @brief * The setFPGAD48PumpControl function sets the controls for @@ -1193,6 +1196,23 @@ /*********************************************************************//** * @brief + * The setFPGAD92PumpSetStepSpeed function sets the step speed period for + * HDF D92_Pump. + * @details \b Inputs: none + * @details \b Outputs: fpgaD92PumpSpeed + * @param stepSpeed The HDF pump step speed period + * @return none + *************************************************************************/ +void setFPGAD92PumpSetStepSpeed( U32 stepSpeed ) +{ + if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ) + { + fpgaActuatorSetPoints.fpgaD92PumpSpeed = stepSpeed; + } +} + +/*********************************************************************//** + * @brief * The setFPGAD11PumpControl function sets the DVT concentrate pump 1 * (acid pump) control mode. * bit 7: Park (set in different function) @@ -1256,6 +1276,29 @@ /*********************************************************************//** * @brief + * The setFPGAD92PumpControl function sets the UF pump + * (D76 pump) control mode. + * bit 7: Park (set in different function) + * bit 6: nSleep + * bit 5: nReset + * bit 4: nEnable + * bit 3: Direction (1=Fwd, 0=Rev) + * bit 0-2: Microstepping resolution + * @details \b Inputs: none + * @details \b Outputs: fpgaD76PumpControl + * @param control UF pump control set + * @return none + *************************************************************************/ +void setFPGAD92PumpControl( U08 control ) +{ + if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ) + { + fpgaActuatorSetPoints.fpgaD92PumpControl &= 0x80; // preserve msb (park command bit) + fpgaActuatorSetPoints.fpgaD92PumpControl |= control; + } +} +/*********************************************************************//** + * @brief * The setFPGAD11PumpParkCmd function sets the DVT concentrate pump 1 * (acid pump) park command bit. * bit 7: Park command bit @@ -1374,6 +1417,22 @@ /*********************************************************************//** * @brief + * The setFPGAD92PumpRevolutionCount function sets the HDF + * pump revolution count. + * @details \b Inputs: none + * @details \b Outputs: fpgaD92PumpRevCount + * @param count the number of revolution to be rotated for the pump. + * @return none + *************************************************************************/ +void setFPGAD92PumpRevolutionCount( U32 count ) +{ + if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ) + { + fpgaActuatorSetPoints.fpgaD92PumpRevCount = count; + } +} +/*********************************************************************//** + * @brief * The setFPGAD5HeaterOnOffControl function sets the primary heater * On/Off control. * @details \b Inputs: none @@ -1672,6 +1731,36 @@ /*********************************************************************//** * @brief + * The getFPGAD76PumpControlStatus function gets the Ultrafilteration pump + * (D76 pump) control mode. + * bit 7: Park (set in different function) + * bit 6: nSleep + * bit 5: nReset + * bit 4: nEnable + * bit 3: Direction (1=Fwd, 0=Rev) + * bit 0-2: Microstepping resolution + * @details \b Inputs: none + * @details \b Outputs: fpgaD76PumpControl + * @return UF pump control status bit + *************************************************************************/ +U08 getFPGAD92PumpControlStatus( void ) +{ + U08 result; + + if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ) + { + result = fpgaActuatorSetPoints.fpgaD92PumpControl; + } + else + { + result = 0; + } + + return result; +} + +/*********************************************************************//** + * @brief * The getFPGAUFPumpFault function gets UF pumps fault * reported by FGPA. * @details \b Inputs: fpgaD76PumpFault @@ -3932,4 +4021,5 @@ { return fpgaSensorReadings.fpgaP18CalMemCounter; } + /**@}*/