Index: firmware/App/Services/FpgaDD.h =================================================================== diff -u -r50144ec3e96785cf76d5bfd22ee65029c82e732b -r79f8b1a11dcc2f05a685ca33ba2a53fc4208fb4b --- firmware/App/Services/FpgaDD.h (.../FpgaDD.h) (revision 50144ec3e96785cf76d5bfd22ee65029c82e732b) +++ firmware/App/Services/FpgaDD.h (.../FpgaDD.h) (revision 79f8b1a11dcc2f05a685ca33ba2a53fc4208fb4b) @@ -7,8 +7,8 @@ * * @file FpgaDD.h * -* @author (last) Varshini Nagabooshanam -* @date (last) 27-Jan-2026 +* @author (last) Raghu Kallala +* @date (last) 23-Feb-2026 * * @author (original) Vinayakam Mani * @date (original) 26-Aug-2024 @@ -30,9 +30,18 @@ // ********** public definitions ********** +/// Leak sensor status from FPGA GPIO_Status register. +typedef enum FpgaGpioLeakSensorStatus +{ + FPGA_GPIO_LEAK_SENSOR_NOT_DETECTED = 0, ///< No leak + FPGA_GPIO_LEAK_SENSOR_DETECTED, ///< Leak detected + NUM_OF_FPGA_GPIO_LEAK_SENSOR_STATUS +} FPGA_GPIO_LEAK_SENSOR_STATUS_T; + // ********** public function prototypes ********** void initFPGADD( void ); +void initFPGAPerHW( BOOL isHWBeta2 ); void execFPGAClockSpeedTest( void ); SELF_TEST_STATUS_T execFPGATest( void ); @@ -73,95 +82,55 @@ void setFPGAValveSPPWMPeriod( U16 valvePWMPeriod ); // Conductivity and Temperature Sensor -void setFPGAD17D74Control( U08 control ); -void setFPGAD27D29Control( U08 control ); -void setFPGAD43Control( U08 control ); -void setFPGAD17D74Address( U16 address ); -void setFPGAD27D29Address( U16 address ); -void setFPGAD43Address( U16 address ); -void setFPGAD17D74Data( U32 data ); -void setFPGAD27D29Data( U32 data ); -void setFPGAD43Data( U32 data ); - -void setFPGAD17CondReset( void ); -void clearFPGAD17CondReset( void ); -void setFPGAD17CondInitEnable( void ); -void clearFPGAD17CondInitEnable( void ); -void setFPGAD17CondWriteEnable( void ); -void clearFPGAD17CondWriteEnable( void ); -void setFPGAD17CondReadEnable( void ); -void clearFPGAD17CondReadEnable( void ); - -void setFPGAD27CondReset( void ); -void clearFPGAD27CondReset( void ); -void setFPGAD27CondInitEnable( void ); -void clearFPGAD27CondInitEnable( void ); -void setFPGAD27CondWriteEnable( void ); -void clearFPGAD27CondWriteEnable( void ); -void setFPGAD27CondReadEnable( void ); -void clearFPGAD27CondReadEnable( void ); - -void setFPGAD29CondReset( void ); -void clearFPGAD29CondReset( void ); -void setFPGAD29CondInitEnable( void ); -void clearFPGAD29CondInitEnable( void ); -void setFPGAD29CondWriteEnable( void ); -void clearFPGAD29CondWriteEnable( void ); -void setFPGAD29CondReadEnable( void ); -void clearFPGAD29CondReadEnable( void ); - -void setFPGAD43CondReset( void ); -void clearFPGAD43CondReset( void ); -void setFPGAD43CondInitEnable( void ); -void clearFPGAD43CondInitEnable( void ); -void setFPGAD43CondWriteEnable( void ); -void clearFPGAD43CondWriteEnable( void ); -void setFPGAD43CondReadEnable( void ); -void clearFPGAD43CondReadEnable( void ); - -void setFPGAD74CondReset( void ); -void clearFPGAD74CondReset( void ); -void setFPGAD74CondInitEnable( void ); -void clearFPGAD74CondInitEnable( void ); -void setFPGAD74CondWriteEnable( void ); -void clearFPGAD74CondWriteEnable( void ); -void setFPGAD74CondReadEnable( void ); -void clearFPGAD74CondReadEnable( void ); - U08 getFPGAD17CondReadCount( void ); U08 getFPGAD17CondErrorCount( void ); -U16 getFPGAD17Cond( void ); -U16 getFPGAD17CondTemp( void ); -U32 getFPGAD17CondData( void ); +U08 getFPGAD17TempReadCount( void ); +U08 getFPGAD17TempErrorCount( void ); +F32 getFPGAD17CondData( void ); +F32 getFPGAD17CondTemp( void ); +U32 getFPGAD17CondCalData( void ); +U08 getFPGAD17CalMemCounter( void ); U08 getFPGAD27CondReadCount( void ); U08 getFPGAD27CondErrorCount( void ); -U16 getFPGAD27Cond( void ); -U16 getFPGAD27CondTemp( void ); -U32 getFPGAD27CondData( void ); +U08 getFPGAD27TempReadCount( void ); +U08 getFPGAD27TempErrorCount( void ); +F32 getFPGAD27CondData( void ); +F32 getFPGAD27CondTemp( void ); +U32 getFPGAD27CondCalData( void ); +U08 getFPGAD27CalMemCounter( void ); U08 getFPGAD29CondReadCount( void ); U08 getFPGAD29CondErrorCount( void ); -U16 getFPGAD29Cond( void ); -U16 getFPGAD29CondTemp( void ); -U32 getFPGAD29CondData( void ); +U08 getFPGAD29TempReadCount( void ); +U08 getFPGAD29TempErrorCount( void ); +F32 getFPGAD29CondData( void ); +F32 getFPGAD29CondTemp( void ); +U32 getFPGAD29CondCalData( void ); +U08 getFPGAD29CalMemCounter( void ); U08 getFPGAD43CondReadCount( void ); U08 getFPGAD43CondErrorCount( void ); -U16 getFPGAD43Cond( void ); -U16 getFPGAD43CondTemp( void ); -U32 getFPGAD43CondData( void ); +U08 getFPGAD43TempReadCount( void ); +U08 getFPGAD43TempErrorCount( void ); +F32 getFPGAD43CondData( void ); +F32 getFPGAD43CondTemp( void ); +U32 getFPGAD43CondCalData( void ); +U08 getFPGAD43CalMemCounter( void ); U08 getFPGAD74CondReadCount( void ); U08 getFPGAD74CondErrorCount( void ); -U16 getFPGAD74Cond( void ); -U16 getFPGAD74CondTemp( void ); -U32 getFPGAD74CondData( void ); +U08 getFPGAD74TempReadCount( void ); +U08 getFPGAD74TempErrorCount( void ); +F32 getFPGAD74CondData( void ); +F32 getFPGAD74CondTemp( void ); +U32 getFPGAD74CondCalData( void ); +U08 getFPGAD74CalMemCounter( void ); // Pumps (Dosing and Gear pumps ) -void setFPGAD11PumpSetStepSpeed( U16 stepSpeed ); -void setFPGAD10PumpSetStepSpeed( U16 stepSpeed ); -void setFPGAD76PumpSetStepSpeed( U16 stepSpeed ); +void setFPGAD11PumpSetStepSpeed( U32 stepSpeed ); +void setFPGAD10PumpSetStepSpeed( U32 stepSpeed ); +void setFPGAD76PumpSetStepSpeed( U32 stepSpeed ); void setFPGAD11PumpControl( U08 control ); void setFPGAD10PumpControl( U08 control ); void setFPGAD76PumpControl( U08 control ); @@ -183,9 +152,9 @@ BOOL getFPGAD10PumpIsParked( void ); BOOL getFPGAD11PumpParkFault( void ); BOOL getFPGAD10PumpParkFault( void ); -U16 getFPGAD11PumpHallSensePulseWidth( void ); -U16 getFPGAD10PumpHallSensePulseWidth( void ); -U16 getFPGAD76PumpHallSensePulseWidth( void ); +U32 getFPGAD11PumpHallSensePulseWidth( void ); +U32 getFPGAD10PumpHallSensePulseWidth( void ); +U32 getFPGAD76PumpHallSensePulseWidth( void ); U16 getFPGAD11PumpRevolutionCountStatus( void ); U16 getFPGAD10PumpRevolutionCountStatus( void ); U16 getFPGAD76PumpRevolutionCountStatus( void ); @@ -229,7 +198,7 @@ U16 getFPGAD63LevelSensor( void ); U16 getFPGAD98LevelSensor( void ); U16 getFPGAD46LevelSensor( void ); -BOOL getFPGAD6LevelStatus( void ); +U08 getFPGAD6LevelStatus( void ); U08 getFPGAFloater2Status( void ); //Temperature sensors @@ -240,7 +209,19 @@ U32 getFPGAD99Temp( void ); U08 getFPGARTDReadCount( void ); U08 getFPGARTDCountErrorCycles( void ); +U08 getFPGAIOExpanderReadCount( void ); +U08 getFPGAIOExpanderErrorCount( void ); +U08 getFPGAHallSensorStatus( void ); +U08 getFPGAGPIOStatus( void ); +BOOL getACSwitchStatus( void ); +FPGA_GPIO_LEAK_SENSOR_STATUS_T getFPGALeakSensorStatus( void ); + +U32 getFPGATempTax1( void ); +U32 getFPGATempRTD( void ); +U08 getFPGAAD7124ReadCount( void ); +U08 getFPGAAD7124ErrorCount( void ); + //Primary and Trimmer heater void setFPGAD5HeaterPWMControl( U08 control ); void setFPGAD45HeaterPWMControl( U08 control ); @@ -308,6 +289,10 @@ U16 getFPGAFlowP7( void ); U16 getFPGAFlowP7Temp( void ); U16 getFPGAFlowP7InternalTemp( void ); +U08 getFPGAFlowP7ReadCount( void ); +U08 getFPGAFlowP7ErrorCount( void ); +U08 getFPGAFlowP16ReadCount( void ); +U08 getFPGAFlowP16ErrorCount( void ); void setFPGAP9Control( U08 control ); void setFPGAP9Address( U16 address ); @@ -316,36 +301,25 @@ void setFPGAP18Address( U16 address ); void setFPGAP18Data( U32 data ); -void setFPGAP9Reset( void ); -void clearFPGAP9Reset( void ); -void setFPGAP9InitEnable( void ); -void clearFPGAP9InitEnable( void ); -void setFPGAP9WriteEnable( void ); -void clearFPGAP9WriteEnable( void ); -void setFPGAP9ReadEnable( void ); -void clearFPGAP9ReadEnable( void ); +// Conductivity +U08 getFPGAP9CondReadCount( void ); +U08 getFPGAP9CondErrorCount( void ); +U08 getFPGAP9TempReadCount( void ); +U08 getFPGAP9TempErrorCount( void ); +F32 getFPGAP9CondData( void ); +F32 getFPGAP9CondTemp( void ); +U32 getFPGAP9CondCalData( void ); +U08 getFPGAP9CalMemCounter( void ); -void setFPGAP18Reset( void ); -void clearFPGAP18Reset( void ); -void setFPGAP18InitEnable( void ); -void clearFPGAP18InitEnable( void ); -void setFPGAP18WriteEnable( void ); -void clearFPGAP18WriteEnable( void ); -void setFPGAP18ReadEnable( void ); -void clearFPGAP18ReadEnable( void ); +U08 getFPGAP18CondReadCount( void ); +U08 getFPGAP18CondErrorCount( void ); +U08 getFPGAP18TempReadCount( void ); +U08 getFPGAP18TempErrorCount( void ); +F32 getFPGAP18CondData( void ); +F32 getFPGAP18CondTemp( void ); +U32 getFPGAP18CondCalData( void ); +U08 getFPGAP18CalMemCounter( void ); -U08 getFPGAP9ReadCount( void ); -U08 getFPGAP9ErrorCount( void ); -U16 getFPGAP9Conductivity( void ); -U16 getFPGAP9Temperature( void ); -U32 getFPGAP9Data( void ); - -U08 getFPGAP18ReadCount( void ); -U08 getFPGAP18ErrorCount( void ); -U16 getFPGAP18Conductivity( void ); -U16 getFPGAP18Temperature( void ); -U32 getFPGAP18Data( void ); - void setFPGAP40PumpEnable( BOOL enable ); void setFPGAP40PumpPWM( U16 pwm ); U16 getFPGAP40PumpPWM( void );