Index: firmware/App/Services/FpgaDD.c =================================================================== diff -u -r382ed222cde91c19693f4c0f6c28e1d16029da99 -r0845b50300f9dd52f4b456f428972426b02fe39d --- firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 382ed222cde91c19693f4c0f6c28e1d16029da99) +++ firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 0845b50300f9dd52f4b456f428972426b02fe39d) @@ -506,6 +506,89 @@ U16 fpgaConSensD43_Addrs; ///< Reg 119. D43 Initialization Address register U32 fpgaConSensD43_Data_In; ///< Reg 121. D43 Initialization data register } FPGA_ACTUATORS_T; + +typedef struct +{ + U16 fpgaValveControl; ///< Reg 04. Valve control register + U16 fpgaValvePWMEnable; ///< Reg 06. Valve PWM enable + U16 fpgaDDValvePWMLow; ///< Reg 08. DD valves PWM low. (VDR) + U16 fpgaDDValvePWMPeriod; ///< Reg 10. DD valves PWM period (VDR) + U16 fpgaDDValvePWMPullin; ///< Reg 12. DD valves pull in (VDR) + U08 fpgaBCValveControl; ///< Reg 14. Balancing Chamber Valves Control Registers + U08 fpgaBCValvePWMControl; ///< Reg 15. Balancing Chamber Valves PWM control + U08 fpgaDDSpareValveControl; ///< Reg 16. Spare Valves Control Registers + U08 fpgaDDSpareValvePWMControl; ///< Reg 17. Spare Valves PWM control + U08 fpgaConSensD17D74Control; ///< Reg 18. Conductivity/Temperature Sensors D17 & D74 Control registers + U08 fpgaConSensD27D29Control; ///< Reg 19. Conductivity/Temperature Sensors D27 & D29 Control registers + U16 fpgaConSensD17D74_Addrs; ///< Reg 20. D17,D74 Initialization Address register + U32 fpgaConSensD17D74_Data_In; ///< Reg 22. D17,D74 Initialization data register + U16 fpgaConSensD27D29_Addrs; ///< Reg 26. D27,D29 Initialization Address register + U32 fpgaConSensD27D29_Data_In; ///< Reg 28. D27,D29 Initialization data register + U16 fpgaRemoteUpdate_Write; ///< Reg 32.Register for Remote update used by SW. + U16 fpgaD12PumpSpeed; ///< Reg 34. D48 Speed/RPM Control + U08 fpgaD12PumpControl; ///< Reg 36. DGP Control + U08 fpgaD48PumpControl; ///< Reg 37. SDP Control + U16 fpgaD48PumpSpeed; ///< Reg 38. SDP Speed/RPM Control + U16 unusedRegister; ///< Reg 40. Unused register + U08 fpgaD11PumpControl; ///< Reg 42. Acid Concentrate Pump Control + U08 fpgaD10PumpControl; ///< Reg 43. BiCarb Concentrate Pump Control + U16 unusedRegister1; ///< Reg 44. Unused register1 + U08 fpgaD42SensorTest; ///< Reg 46. Blood leak sensor test + U08 fpgaD42UARTControl; ///< Reg 47. Blood leak sensor UART control + U08 fpgaD42FIFOTx; ///< Reg 48. Blood leak sensor FIFO transmit control + U08 fpgaD5HeaterPWMControl; ///< Reg 49. Primary heater PWM control + U08 fpgaD45HeaterPWMControl; ///< Reg 50. Trimmer heater PWM control + U08 fpgaD79PWMPumpCtl; ///< Reg 51. Rinse pump PWM control + U16 fpgaVBCPWMLow; ///< Reg 52. VBC PWM low ( Balancing chamber valves) + U16 fpgaVBCPWMPeriod; ///< Reg 54. VBC PWM period + U16 fpgaVBCPWMPullIn; ///< Reg 56. VBC PWM pull in + U16 fpgaVSPPWMLow; ///< Reg 58. VSP PWM low ( Spare valves ) + U16 fpgaVSPPWMPeriod; ///< Reg 60. VSP PWM period + U16 fpgaVSPPWMPullIn; ///< Reg 62. VSP PWM pull in + U16 fpgaD11PumpRevCount; ///< Reg 64. Acid Concentrate pump revolution count + U16 fpgaD10PumpRevCount; ///< Reg 66. Bicarb Concentrate pump revolution count + U08 fpgaADCControl; ///< Reg 68. FPGA internal ADC Control register for debugging + U08 fpgaGPIOControl; ///< Reg 69. FPGA GPIO control interface + U16 fpgaACRelayPWMLow; ///< Reg 70. Length of time in 10us resoultion that PWM output stays low. + U16 fpgaACRelayPWMPeriod; ///< Reg 72. PWM period for AC relay/heater. + U16 unusedRegister2; ///< Reg 74. Unsed register2 + U16 fpgaD76PumpRevCount; ///< Reg 76. UF pump revolution count + U08 fpgaD76PumpControl; ///< Reg 78. UF Pump Control + + U08 notused; ///< Reg 79. Not used + U08 valveIOControl; ///< Reg 80. IO Valve control register. + U08 valveFPControl; ///< Reg 81. FP Valve control register. + U08 conductivityP9Control; ///< Reg 82. P9 conductivity control register. + U08 conductivityP18Control; ///< Reg 83. P18 conductivity control register. + U16 conductivityP9Address; ///< Reg 84. P9 conductivity address register. + U32 conductivityP9Data; ///< Reg 86. P9 conductivity data in register. + U16 conductivityP18Address; ///< Reg 90. P18 conductivity address register. + U32 conductivityP18Data; ///< Reg 92. P18 conductivity data in register. + U16 descalePumpSpeed; ///< Reg 96. Descaler pump speed register. + U08 descalePumpControl; ///< Reg 98. Descaler pump control register. + U08 p12PumpControl; ///< Reg 99. P12 pump control register. + U16 valveIOFPPWMLow; ///< Reg 100. Valve VWi PWM low pulse period in 0.1 uSec. + U16 valveIOFPPWMPeriod; ///< Reg 102. Valve VWi PWM full period in 0.1 uSec. + U16 valveIOFPPWMPullIn; ///< Reg 104. Valve PWM high pulse period when valve is on in 0.1 uSec. + U16 p12PumpPWMDutyCyclePct; ///< Reg 106. P12 pump PWM duty cycle in percentage. + U16 p40PumpPWMDutyCyclePct; ///< Reg 108. P40 pump PWM duty cycle in percentage. + U08 p40PumpControl; ///< Reg 110. P40 pump control register. + U08 reserved1; ///< Reg 111. Reserved. + U08 flowControlp7; ///< Reg 112. P7 AVS Romer flow sensor control register. + U08 flowAddressp7; ///< Reg 113. P7 AVS Romer flow sensor I2C slave address register. + U08 valveIOPWMEnable; ///< Reg 114. Valve IO PWM enable register. + U08 valveFPPWMEnable; ///< Reg 115. Valve FP PWM enable register. + U08 flowControlp16; ///< Reg 116. P16 AVS Romer flow sensor control register. + U08 flowAddressp16; ///< Reg 117. P16 AVS Romer flow sensor I2C slave address register. + + 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 unsuedRegister; ///< Reg 125. Unused register. + 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 +} FPGA_ACTUATORS_BETA_2_T; #pragma pack(pop) // ********** private data ********** @@ -537,7 +620,7 @@ { // Initialize fpga driver for beta 2 hardware initFPGA( (U08*)&fpgaHeader, (U08*)&fpgaSensorReadings, (U08*)&fpgaActuatorSetPoints, - sizeof(FPGA_HEADER_T), sizeof(DD_FPGA_SENSORS_BETA_2_T), sizeof(FPGA_ACTUATORS_T) ); + sizeof(FPGA_HEADER_T), sizeof(DD_FPGA_SENSORS_BETA_2_T), sizeof(FPGA_ACTUATORS_BETA_2_T) ); } // initialize fpga data structures