Index: firmware/App/Services/FpgaDD.c =================================================================== diff -u -r83bae6ae5f7f26a3511d1d6965310fd8ac9ad496 -rc49f9ed931d60e5bd1d0a406fde6c9fe1437f73b --- firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 83bae6ae5f7f26a3511d1d6965310fd8ac9ad496) +++ firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision c49f9ed931d60e5bd1d0a406fde6c9fe1437f73b) @@ -626,6 +626,25 @@ 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 + + U32 fpgaCondSensCalData1; ///< Reg 146 Conductivity Sensor Calibration Coefficient 1 + U32 fpgaCondSensCalData2; ///< Reg 150 Conductivity Sensor Calibration Coefficient + U32 fpgaCondSensCalData3; ///< Reg 154 Conductivity Sensor Calibration Coefficient + U32 fpgaCondSensCalData4; ///< Reg 158 Conductivity Sensor Calibration Coefficient + U32 fpgaCondSensCalData5; ///< Reg 162 Conductivity Sensor Calibration Coefficient + U32 fpgaCondSensCalData6; ///< Reg 166 Conductivity Sensor Calibration Coefficient + U32 fpgaCondSensCalData7; ///< Reg 170 Conductivity Sensor Calibration Coefficient + U32 fpgaCondSensCalData8; ///< Reg 174 Conductivity Sensor Calibration Coefficient + U32 fpgaCondSensCalData9; ///< Reg 178 Conductivity Sensor Calibration Coefficient + U32 fpgaCondSensCalData10; ///< Reg 182 Conductivity Sensor Calibration Coefficient + U32 fpgaCondSensCalData11; ///< Reg 186 Conductivity Sensor Calibration Coefficient + U32 fpgaCondSensCalData12; ///< Reg 190 Conductivity Sensor Calibration Coefficient + U32 fpgaCondSensCalibrationTime; ///< Reg 194 Conductivity Sensor Calibration Time + U16 fpgaCondSensCalibrationCRC; ///< Reg 198 Conductivity Sensor Calibration Data CRC + U08 fpgaCondSensorID; ///< Reg 200 Conductivity Sensor Id + U08 fpgaCondSensorCmd; ///< Reg 201 Conductivity Sensor Command + U32 fpgaCondSensorHwVer; ///< Reg 202 Conductivity Sensor Hardware Version Number + U32 fpgaCondSensorSerialNum; ///< Reg 206 Conductivity Sensor Serial Number } FPGA_ACTUATORS_T; #pragma pack(pop) @@ -2200,18 +2219,6 @@ /*********************************************************************//** * @brief - * The setFPGAD17CondData function sets the D17 cal data. - * @details \b Inputs: none - * @details \b Outputs: fpgaActuatorSetPoints.fpgaD17DataCal - * @return none - *************************************************************************/ -void setFPGAD17CondCalData( U32 data ) -{ -// fpgaActuatorSetPoints.fpgaD17DataCal = data; -} - -/*********************************************************************//** - * @brief * The getFPGAD27CondReadCount function gets D27 conductivity sensor read count. * @details \b Inputs: fpgaD27CondReadCnt * @details \b Outputs: none @@ -2308,18 +2315,6 @@ /*********************************************************************//** * @brief - * The setFPGAD27CondData function sets the D27 cal data. - * @details \b Inputs: none - * @details \b Outputs: fpgaActuatorSetPoints.fpgaD27DataCal - * @return none - *************************************************************************/ -void setFPGAD27CondCalData( U32 data ) -{ -// fpgaActuatorSetPoints.fpgaD27DataCal = data; -} - -/*********************************************************************//** - * @brief * The getFPGAD29CondReadCount function gets D29 conductivity sensor read count. * @details \b Inputs: fpgaD29CondReadCnt * @details \b Outputs: none @@ -2415,18 +2410,6 @@ /*********************************************************************//** * @brief - * The setFPGAD29CondData function sets the D29 cal data. - * @details \b Inputs: none - * @details \b Outputs: fpgaActuatorSetPoints.fpgaD29DataCal - * @return none - *************************************************************************/ -void setFPGAD29CondCalData( U32 data ) -{ -// fpgaActuatorSetPoints.fpgaD29DataCal = data; -} - -/*********************************************************************//** - * @brief * The getFPGAD43CondReadCount function gets D43 conductivity sensor read count. * @details \b Inputs: fpgaD43CondReadCnt * @details \b Outputs: none @@ -2523,18 +2506,6 @@ /*********************************************************************//** * @brief - * The setFPGAD43CondData function sets the D43 cal data. - * @details \b Inputs: none - * @details \b Outputs: fpgaActuatorSetPoints.fpgaD43DataCal - * @return none - *************************************************************************/ -void setFPGAD43CondCalData( U32 data ) -{ -// fpgaActuatorSetPoints.fpgaD43DataCal = data; -} - -/*********************************************************************//** - * @brief * The getFPGAD74CondReadCount function gets D74 conductivity sensor read count. * @details \b Inputs: fpgaD74CondReadCnt * @details \b Outputs: none @@ -2630,18 +2601,6 @@ /*********************************************************************//** * @brief - * The setFPGAD74CondData function sets the D74 cal data. - * @details \b Inputs: none - * @details \b Outputs: fpgaActuatorSetPoints.fpgaD74DataCal - * @return none - *************************************************************************/ -void setFPGAD74CondCalData( U32 data ) -{ -// fpgaActuatorSetPoints.fpgaD74DataCal = data; -} - -/*********************************************************************//** - * @brief * The getFPGAD63LevelSensor function gets the latest FPGA D63 upper level * sensor reading. * @details \b Inputs: fpgaD63LevelSensor @@ -3974,18 +3933,6 @@ /*********************************************************************//** * @brief - * The setFPGAP9CondData function sets the P9 cal data. - * @details \b Inputs: none - * @details \b Outputs: fpgaActuatorSetPoints.fpgaP9DataCal - * @return none - *************************************************************************/ -void setFPGAP9CondCalData( U32 data ) -{ -// fpgaActuatorSetPoints.fpgaP9DataCal = data; -} - -/*********************************************************************//** - * @brief * The getFPGAP18CondReadCount function gets the P18 conductivity read count. * @details \b Inputs: fpgaSensorReadings.fpgaP18CondReadCount * @details \b Outputs: none @@ -4082,18 +4029,6 @@ /*********************************************************************//** * @brief - * The setFPGAP18CondData function sets the P18 cal data. - * @details \b Inputs: none - * @details \b Outputs: fpgaActuatorSetPoints.fpgaP18DataCal - * @return none - *************************************************************************/ -void setFPGAP18CondCalData( U32 data ) -{ -// fpgaActuatorSetPoints.fpgaP18DataCal = data; -} - -/*********************************************************************//** - * @brief * The getFPGAD92PumpHallSenseCount function gets substitution pump, D92, * hall sensor speed counter. * @details \b Inputs: fpgaD92SpeedCnt @@ -4153,4 +4088,261 @@ return fpgaSensorReadings.fpgaACHeaterPMonVrms; } +/*********************************************************************//** + * @brief + * The setFPGACondSensCalData1 function sets Calibration Data Coefficient 1 + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensCalData1 + * @param Value of the Calibration data Coefficient 1 + * @return none + *************************************************************************/ +void setFPGACondSensCalData1( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensCalData1 = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensCalData2 function sets Calibration Data Coefficient 2 + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensCalData2 + * @param Value of the Calibration data Coefficient 2 + * @return none + *************************************************************************/ +void setFPGACondSensCalData2( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensCalData2 = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensCalData3 function sets Calibration Data Coefficient 3 + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensCalData3 + * @param Value of the Calibration data Coefficient 3 + * @return none + *************************************************************************/ +void setFPGACondSensCalData3( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensCalData3 = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensCalData4 function sets Calibration Data Coefficient 4 + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensCalData4 + * @param Value of the Calibration data Coefficient 4 + * @return none + *************************************************************************/ +void setFPGACondSensCalData4( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensCalData4 = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensCalData5 function sets Calibration Data Coefficient 5 + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensCalData5 + * @param Value of the Calibration data Coefficient 5 + * @return none + *************************************************************************/ +void setFPGACondSensCalData5( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensCalData5 = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensCalData6 function sets Calibration Data Coefficient 6 + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensCalData6 + * @param Value of the Calibration data Coefficient 6 + * @return none + *************************************************************************/ +void setFPGACondSensCalData6( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensCalData6 = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensCalData7 function sets Calibration Data Coefficient 7 + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensCalData7 + * @param Value of the Calibration data Coefficient 7 + * @return none + *************************************************************************/ +void setFPGACondSensCalData7( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensCalData7 = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensCalData8 function sets Calibration Data Coefficient 8 + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensCalData8 + * @param Value of the Calibration data Coefficient 8 + * @return none + *************************************************************************/ +void setFPGACondSensCalData8( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensCalData8 = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensCalData9 function sets Calibration Data Coefficient + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensCalData9 + * @param Value of the Calibration data Coefficient 9 + * @return none + *************************************************************************/ +void setFPGACondSensCalData9( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensCalData9 = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensCalData10 function sets Calibration Data Coefficient 10 + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensCalData10 + * @param Value of the Calibration data Coefficient 10 + * @return none + *************************************************************************/ +void setFPGACondSensCalData10( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensCalData10 = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensCalData11 function sets Calibration Data Coefficient 11 + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensCalData11 + * @param Value of the Calibration data Coefficient 11 + * @return none + *************************************************************************/ +void setFPGACondSensCalData11( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensCalData11 = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensCalData12 function sets Calibration Data Coefficient 12 + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensCalData12 + * @param Value of the Calibration data Coefficient 12 + * @return none + *************************************************************************/ +void setFPGACondSensCalData12( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensCalData12 = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensCalibrationTime function sets the Conductivity Sensor + * Calibration Time + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensCalibrationTime + * @param Value of the Conductivity Sensor Calibration Time + * @return none + *************************************************************************/ +void setFPGACondSensCalibrationTime( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensCalibrationTime = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensCalibrationCRC function sets the Conductivity Sensor + * Calibration Data CRC + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensCalibrationCRC + * @param Value of the Conductivity Sensor Calibration Data CRC + * @return none + *************************************************************************/ +void setFPGACondSensCalibrationCRC( U16 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensCalibrationCRC = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensorId function sets the Conductivity Sensor Id + * When 01 : Will send data to P9_P10 + * When 02 : Will send data to P18_P19 + * When 03 : Will send data to D16_D17 + * When 04 : Will send data to D74_D75 + * When 05 : Will send data to D27_D28 + * When 06 : Will send data to D29_D30 + * When 07 : Will send data to D43_D44 + * Any other value, the FPGA will not transmit data. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensorID + * @param Value of the Conductivity Sensor Id + * @return none + *************************************************************************/ +void setFPGACondSensorId( U08 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensorID = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensorCommand function sets the Conductivity Sensor Command + * Use this command byte to inform FPGA that new Cal Coefficients are ready + * to be sent to conductive sensor + * Bit 0 : When a 0 to 1 transitions, the FPGA will send + * Calibration Coefficents (Command T) + * Bit 1 : When a 0 to 1 transitions, the FPGA will send + * Hardware Version and Serial Number (Command V) + * Bit 2 : When a 0 to 1 transitions, the FPGA will send + * reset to all conductivity sensors + * Any other bits will be ignored in this command. + * Please note only one command can be done at 1 time so + * do not toggle more than 1 bit at a time + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensorCmd + * @param Value of the Conductivity Sensor Command + * @return none + *************************************************************************/ +void setFPGACondSensorCommand( U08 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensorCmd = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensorHwVer function sets the Conductivity Sensor + * Hardware Version Number + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensorHwVer + * @param Value of the the Conductivity Sensor Hardware Version Number + * @return none + *************************************************************************/ +void setFPGACondSensorHwVer( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensorHwVer = value; +} + +/*********************************************************************//** + * @brief + * The setFPGACondSensorSerialNum function sets the Conductivity Sensor + * Serial Number + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaCondSensorSerialNum + * @param Value of the Conductivity Sensor Serial Number + * @return none + *************************************************************************/ +void setFPGACondSensorSerialNum( U32 value ) +{ + fpgaActuatorSetPoints.fpgaCondSensorSerialNum = value; +} + /**@}*/