Index: firmware/App/Services/FpgaDD.c =================================================================== diff -u -r82b841cdb65ac335475e02841b7b568d1f5c77b1 -r1c4e2ce92ecb2e4b4301aba7bd2b869f1116d0f6 --- firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 82b841cdb65ac335475e02841b7b568d1f5c77b1) +++ firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 1c4e2ce92ecb2e4b4301aba7bd2b869f1116d0f6) @@ -8,8 +8,8 @@ * * @file FpgaDD.c * -* @author (last) Varshini Nagabooshanam -* @date (last) 27-Jan-2026 +* @author (last) Vinayakam Mani +* @date (last) 09-Feb-2026 * * @author (original) Vinayakam Mani * @date (original) 26-Aug-2024 @@ -142,149 +142,130 @@ U16 fpgaD18PresTemp; ///< Reg 534. D18 MPM pressure sensor RAW temperature data U16 fpgaD41PresPressure; ///< Reg 536. D41 MPM pressure sensor RAW pressure data U16 fpgaD41PresTemp; ///< Reg 538. D41 MPM pressure sensor RAW temperature data - U16 fpgaD63LevelSensor; ///< Reg 540. Upper level Sensor - U16 fpgaD46LevelSensor; ///< Reg 542. Level Sensor 2 - U08 fpgaHallSensInputs; ///< Reg 544. Hall sensor Inputs - U08 fpgaD42TxFIFOCnt; ///< Reg 545. Blood leak sensor transmit FIFO count - U16 fpgaD42RxErrorCnt; ///< Reg 546. Blood leak sensor Receive error count - U16 fpgaD42RxFIFOCnt; ///< Reg 548. Blood leak sensor Receive FIFO count - U08 fpgaD42RxFIFODataOut; ///< Reg 550. Blood leak sensor Receive data - U08 fpgaD42PulseStatus; ///< Reg 551. Blood leak sensor status - U16 fpgaValveStates; ///< Reg 552. Valve status read - U16 fpgaValvePWMEnableStates; ///< Reg 554. Valve PWM Enable status read - U08 fpgaValveBCStates; ///< Reg 556. Balancing chamber Valves states - U08 fpgaValveBCPWMStates; ///< Reg 557. Balancing Chamber Valve PWM states - U08 fpgaValveSpStates; ///< Reg 558. DD Spare Valves states - U08 fpgaValveSpPWMStates; ///< Reg 559. Spare Valves PWM states - U08 fpgaD11_D10_PumpFault; ///< Reg 560. Concentrate pump fault register for D11_Pump and D10_Pump - U08 fpgaD78D1D4D50ErrorCounter; ///< Reg 561. Count of each incomplete seq of reads from RTD ADC. - U16 fpga_UnUsed_1; ///< Reg 562. Concentrate pump D11_Pump hall sensor pulse width - U16 fpga_UnUsed_2; ///< Reg 564. Concentrate pump D10_Pump hall sensor pulse width - U32 fpgaD78Temp; ///< Reg 566. Outlet heat exchanger temperature - U32 fpgaD1Temp; ///< Reg 570. Inlet heat exchanger temperature - U32 fpgaD4Temp; ///< Reg 574. Hydraulics primary heater temperature - U32 fpgaD50Temp; ///< Reg 578. Trimmer heater temperature - U16 fpgaD98LevelSensor; ///< Reg 582. Lower level Sensor - U16 fpgaD12MeasuredSpeed; ///< Reg 584. Fresh dialysate pump measured speed - U16 fpgaD48MeasuredSpeed; ///< Reg 586. Spent dialysate pump measured speed - U08 fpgaRTDReadCnt; ///< Reg 588. Read count for all RTD sensors - U08 fpgaD12D48PumpStatus; ///< Reg 589. Dialysate pumps Error status - U16 fpgaD12CurrentFeedback; ///< Reg 590. Fresh dialysate pump current feedback - U16 fpgaD48CurrentFeedback; ///< Reg 592. Spent dialysate pump current feedback - U08 fpgaD12HallStatus; ///< Reg 594. Fresh dialysate pump hall sensor direction status - U08 fpgaD48HallStatus; ///< Reg 595. Spent dialysate pump hall sensor direction status - U08 fpgaD6FloaterStatus; ///< Reg 596. Floater 1 level sensor status - U08 fpgaFloater2Status; ///< Reg 597. Floater 2 level sensor status - U16 fpgaD11PumpStepCountStatus; ///< Reg 598. Acid concentrate pump revolution down count status - U16 fpgaD10PumpStepCountStatus; ///< Reg 600. Bicarb concentrate pump revolution down count status - U16 fpgaAdcTemp; ///< Reg 602. TBD - U16 fpgaAdcVccInt; ///< Reg 604. TBD - U16 fpgaAdcVccAux; ///< Reg 606. TBD - U16 fpgaAdcVpVn; ///< Reg 608. TBD - U16 fpgaD12PumpSpeedFeedback; ///< Reg 610. D12 Pump speed feedback - U16 fpgaD48PumpSpeedFeedback; ///< Reg 612. D48 Pump Speed feedback - U16 fpga_UnUsed_3; ///< Reg 614. UF D76_Pump hall sensor pulse width - U16 fpgaD76PumpStepCountStatus; ///< Reg 616. UF pump revolution down count status - U08 fpgaD76PumpFault; ///< Reg 618: UF pump fault - U08 fpga_UnUsed_4; ///< Reg 619: Not used - S16 pressureP46; ///< Reg 620. P46 pressure data. - U16 temperatureP46; ///< Reg 622. P46 temperature data. - S16 pressureM3; ///< Reg 624. M3 pressure data. - U16 temperatureM3; ///< Reg 626. M3 temperature data. - S16 pressureP8; ///< Reg 628. P8 pressure data. - U16 temperatureP8; ///< Reg 630. P8 temperature data. - S16 pressureP13; ///< Reg 632. P13 pressure data. - U16 temperatureP13; ///< Reg 634. P13 temperature data. - S16 pressureP17; ///< Reg 636. P17 pressure data. - U16 temperatureP17; ///< Reg 638. P17 temperature data. - U16 p40PumpTachCount; ///< Reg 640. P40 pump tachometer counter. - U08 p25LevelSwitch; ///< Reg 642. P25 level switch. - U08 fpga_UnUsed_5; ///< Reg 643. Reserved. - U16 flowRateP7; ///< Reg 644. P7 flow sensor rate. - U16 flowTempP7; ///< Reg 646. P7 flow sensor temperature. - U16 p12PumpTachCount; ///< Reg 648. P12 pump tachometer counter. - U16 d79SpeedPulseWidth; ///< Reg 650. D79 pusle width feedback. - U16 flowIntTempP7; ///< Reg 652. P7 flow sensor internal temperature. - U08 valveIOControlReadback; ///< Reg 654. IO Valve control bits read back. - U08 valveFPControlReadback; ///< Reg 655. FP Valve control enable read back. - U08 valveIOPWMEnableReadback; ///< Reg 656. IO Valve PWM enable read back. - U08 valveFPPWMEnableReadback; ///< Reg 657. FP Valve PWM enable read back. - U16 p12PumpPWMReadback; ///< Reg 658. P12 pump PWM read back. - U16 p40PumpPWMReadback; ///< Reg 660. P40 pump PWM read back. - U08 p7flowReadCount; ///< Reg 662. P7 Flow sensor read counter. - U08 p7flowErrorCount; ///< Reg 663. P7 Flow sensor error counter. - U16 fpgaD87PresPressure; ///< Reg 664. D87 MPM pressure sensor RAW pressure data - U16 fpgaD87PresTemp; ///< Reg 666. D87 MPM pressure sensor RAW temperature data - U32 fpgaD99Temp; ///< Reg 668. D99 temperature sensor - U32 fpga_UnUsed_6; ///< Reg 672. eserved. - U32 fpga_UnUsed_7; ///< Reg 676. Reserved. - U08 ad7124errcnt; ///< Reg 680. Counter which increments when an invalid transaction happen between FPGA and AD7124. - U08 ad7124readcnt; ///< Reg 681. Counter which increments when a valid transaction happens between FPGA and AD7124. - U16 flowRateP16; ///< Reg 682. P16 flow sensor rate. - U16 flowTempP16; ///< Reg 684. P16 flow sensor temperature. - U16 flowIntTempP16; ///< Reg 686. P16 flow sensor internal temperature. - U08 p16flowReadCount; ///< Reg 688. P16 Flow sensor read counter. - U08 p16flowErrorCount; ///< Reg 689. P16 Flow sensor error counter. - U32 d11HallSense; ///< Reg 690. D11 Pump hall sensor optical sensor interface pulse width. - U32 d10HallSense; ///< Reg 694. D10 Pump hall sensor optical sensor interface pulse width. - U32 d76HallSense; ///< Reg 698. D76 Pump hall sensor optical sensor interface pulse width. - U32 d17CondCalData; ///< Reg 702. D16 Cal Word - Holds current word being read from cal memory. - U32 d17CondCond; ///< Reg 706. D16 Conductivity Measurement. - U32 d17CondTemp; ///< Reg 710. D16 Temperature Measurement. - U08 d17CondCondReadCount; ///< Reg 714. D16 Conductivity successful read count. - U08 d17CondCondErrorCount; ///< Reg 715. D16 Conductivity unsuccessful error count. - U08 d17CondTempReadCount; ///< Reg 716. D16 Temperature successful read count. - U08 d17CondTempErrorCount; ///< Reg 717. D16 Temperature unsuccessful error count. - U08 d17CondMemCounter; ///< Reg 718. D16 Cal memory counter that keeps track of which cal word. - U08 d74CondMemCounter; ///< Reg 719. D74 Cal memory counter that keeps track of which cal word. - U32 d74CondCalData; ///< Reg 720. D74 Cal Word - Holds current word being read from cal memory. - U32 d74CondCond; ///< Reg 724. D74 Conductivity Measurement. - U32 d74CondTemp; ///< Reg 728. D74 Temperature Measurement. - U08 d74CondCondReadCount; ///< Reg 732. D74 Conductivity successful read count. - U08 d74CondCondErrorCount; ///< Reg 733. D74 Conductivity unsuccessful error count. - U08 d74CondTempReadCount; ///< Reg 734. D74 Temperature successful read count. - U08 d74CondTempErrorCount; ///< Reg 735. D74 Temperature unsuccessful error count. - U32 d27CondCalData; ///< Reg 736. D27 Cal Word - Holds current word being read from cal memory. - U32 d27CondCond; ///< Reg 740. D27 Conductivity Measurement. - U32 d27CondTemp; ///< Reg 744. D27 Temperature Measurement. - U08 d27CondCondReadCount; ///< Reg 748. D27 Conductivity successful read count. - U08 d27CondCondErrorCount; ///< Reg 749. D27 Conductivity unsuccessful error count. - U08 d27CondTempReadCount; ///< Reg 750. D27 Temperature successful read count. - U08 d27CondTempErrorCount; ///< Reg 751. D27 Temperature unsuccessful error count. - U08 d27CondMemCounter; ///< Reg 752. D27 Cal memory counter that keeps track of which cal word. - U08 d29CondMemCounter; ///< Reg 753. D29 Cal memory counter that keeps track of which cal word. - U32 d29CondCalData; ///< Reg 754. D29 Cal Word - Holds current word being read from cal memory. - U32 d29CondCond; ///< Reg 758. D29 Conductivity Measurement. - U32 d29CondTemp; ///< Reg 762. D29 Temperature Measurement. - U08 d29CondCondReadCount; ///< Reg 766. D29 Conductivity successful read count. - U08 d29CondCondErrorCount; ///< Reg 767. D29 Conductivity unsuccessful error count. - U08 d29CondTempReadCount; ///< Reg 768. D29 Temperature successful read count. - U08 d29CondTempErrorCount; ///< Reg 769. D29 Temperature unsuccessful error count. - U32 d43CondCalData; ///< Reg 770. D43 Cal Word - Holds current word being read from cal memory. - U32 d43CondCond; ///< Reg 774. D43 Conductivity Measurement. - U32 d43CondTemp; ///< Reg 778. D43 Temperature Measurement. - U08 d43CondCondReadCount; ///< Reg 782. D43 Conductivity successful read count. - U08 d43CondCondErrorCount; ///< Reg 783. D43 Conductivity unsuccessful error count. - U08 d43CondTempReadCount; ///< Reg 784. D43 Temperature successful read count. - U08 d43CondTempErrorCount; ///< Reg 785. D43 Temperature unsuccessful error count. - U08 d43CondMemCounter; ///< Reg 786. D43 Cal memory counter that keeps track of which cal word. - U08 p9CondMemCounter; ///< Reg 787. P9 Cal memory counter that keeps track of which cal word. - U32 p9CondCalData; ///< Reg 788. P9 Cal Word - Holds current word being read from cal memory. - U32 p9CondCond; ///< Reg 792. P9 Conductivity Measurement. - U32 p9CondTemp; ///< Reg 796. P9 Temperature Measurement. - U08 p9CondCondReadCount; ///< Reg 800. P9 Conductivity successful read count. - U08 p9CondCondErrorCount; ///< Reg 801. P9 Conductivity unsuccessful error count. - U08 p9CondTempReadCount; ///< Reg 802. P9 Temperature successful read count. - U08 p9CondTempErrorCount; ///< Reg 803. P9 Temperature unsuccessful error count. - U32 p18CondCalData; ///< Reg 804. P18 Cal Word - Holds current word being read from cal memory. - U32 p18CondCond; ///< Reg 808. P18 Conductivity Measurement. - U32 p18CondTemp; ///< Reg 812. P18 Temperature Measurement. - U08 p18CondCondReadCount; ///< Reg 816. P18 Conductivity successful read count. - U08 p18CondCondErrorCount; ///< Reg 817. P18 Conductivity unsuccessful error count. - U08 p18CondTempReadCount; ///< Reg 818. P18 Temperature successful read count. - U08 p18CondTempErrorCount; ///< Reg 819. P18 Temperature unsuccessful error count. - U08 p18CondMemCounter; ///< Reg 820. P18 Cal memory counter that keeps track of which cal word. + U32 fpgaD17CondDataOut; ///< Reg 540. Data read from Conductivity Sensor D17 register + U16 fpgaD17CondCond; ///< Reg 544. D17 conductivity + U16 fpgaD17CondTemp; ///< Reg 546. D17 Temperature + U08 fpgaD17CondReadCnt; ///< Reg 548. D17 successful read count + U08 fpgaD17CondErrorCnt; ///< Reg 549. D17 error read count + U32 fpgaD27CondDataOut; ///< Reg 550. Data read from Conductivity Sensor D27 register + U16 fpgaD27CondCond; ///< Reg 554. D27 conductivity + U16 fpgaD27CondTemp; ///< Reg 556. D27 Temperature + U08 fpgaD27CondReadCnt; ///< Reg 558. D27 successful read count + U08 fpgaD27CondErrorCnt; ///< Reg 559. D27 error read count + U32 fpgaD29CondDataOut; ///< Reg 560. Data read from Conductivity Sensor D29 register + U16 fpgaD29CondCond; ///< Reg 564. D29 conductivity + U16 fpgaD29CondTemp; ///< Reg 566. D29 Temperature + U08 fpgaD29CondReadCnt; ///< Reg 568. D29 successful read count + U08 fpgaD29CondErrorCnt; ///< Reg 569. D29 error read count + U32 fpgaD43CondDataOut; ///< Reg 570. Data read from Conductivity Sensor D43 register + U16 fpgaD43CondCond; ///< Reg 574. D43 conductivity + U16 fpgaD43CondTemp; ///< Reg 576. D43 Temperature + U08 fpgaD43CondReadCnt; ///< Reg 578. D43 successful read count + U08 fpgaD43CondErrorCnt; ///< Reg 579. D43 error read count + U16 fpgaD63LevelSensor; ///< Reg 580. Upper level Sensor + U16 fpgaD46LevelSensor; ///< Reg 582. Level Sensor 2 + U08 fpgaHallSensInputs; ///< Reg 584. Hall sensor Inputs + U08 fpgaD42TxFIFOCnt; ///< Reg 585. Blood leak sensor transmit FIFO count + U16 fpgaD42RxErrorCnt; ///< Reg 586. Blood leak sensor Receive error count + U16 fpgaD42RxFIFOCnt; ///< Reg 588. Blood leak sensor Receive FIFO count + U08 fpgaD42RxFIFODataOut; ///< Reg 590. Blood leak sensor Receive data + U08 fpgaD42PulseStatus; ///< Reg 591. Blood leak sensor status + U16 fpgaValveStates; ///< Reg 592. Valve status read + U16 fpgaValvePWMEnableStates; ///< Reg 594. Valve PWM Enable status read + U08 fpgaValveBCStates; ///< Reg 596. Balancing chamber Valves states + U08 fpgaValveBCPWMStates; ///< Reg 597. Balancing Chamber Valve PWM states + U08 fpgaValveSpStates; ///< Reg 598. DD Spare Valves states + U08 fpgaValveSpPWMStates; ///< Reg 599. Spare Valves PWM states + U08 fpgaD11_D10_PumpFault; ///< Reg 600. Concentrate pump fault register for D11_Pump and D10_Pump + U08 fpgaRTDCountErrorCycles; ///< Reg 601. Count of each incomplete seq of reads from RTD ADC. + U16 fpga_UnUsed_4; ///< Reg 602. Not Used + U16 fpga_UnUsed_5; ///< Reg 604. Not Used + U32 fpgaD78Temp; ///< Reg 606. Outlet heat exchanger temperature + U32 fpgaD1Temp; ///< Reg 610. Inlet heat exchanger temperature + U32 fpgaD4Temp; ///< Reg 614. Hydraulics primary heater temperature + U32 fpgaD50Temp; ///< Reg 618. Trimmer heater temperature + U16 fpgaD98LevelSensor; ///< Reg 622. Lower level Sensor + U16 fpgaD12MeasuredSpeed; ///< Reg 624. Fresh dialysate pump measured speed + U16 fpgaD48MeasuredSpeed; ///< Reg 626. Spent dialysate pump measured speed + U08 fpgaRTDReadCnt; ///< Reg 628. Read count for all RTD sensors + U08 fpgaD12D48PumpStatus; ///< Reg 629. Dialysate pumps Error status + U16 fpgaD12CurrentFeedback; ///< Reg 630. Fresh dialysate pump current feedback + U16 fpgaD48CurrentFeedback; ///< Reg 632. Spent dialysate pump current feedback + U08 fpgaD12HallStatus; ///< Reg 634. Fresh dialysate pump hall sensor direction status + U08 fpgaD48HallStatus; ///< Reg 635. Spent dialysate pump hall sensor direction status + U08 fpgaD6FloaterStatus; ///< Reg 636. Floater 1 level sensor status + U08 fpgaFloater2Status; ///< Reg 637. Floater 2 level sensor status + U16 fpgaD11PumpStepCountStatus; ///< Reg 638. Acid concentrate pump revolution down count status + U16 fpgaD10PumpStepCountStatus; ///< Reg 640. Bicarb concentrate pump revolution down count status + U16 fpgaAdcTemp; ///< Reg 642. TBD + U16 fpgaAdcVccInt; ///< Reg 644. TBD + U16 fpgaAdcVccAux; ///< Reg 646. TBD + U16 fpgaAdcVpVn; ///< Reg 648. TBD + U16 fpgaD12PumpSpeedFeedback; ///< Reg 650. D12 Pump speed feedback + U16 fpgaD48PumpSpeedFeedback; ///< Reg 652. D48 Pump Speed feedback + U16 fpga_UnUsed_6; ///< Reg 654. Not used + U16 fpgaD76PumpStepCountStatus; ///< Reg 656. UF pump revolution down count status + U08 fpgaD76PumpFault; ///< Reg 658: UF pump fault + U08 fpga_UnUsed_3; ///< Reg 659: Not used + S16 pressureP46; ///< Reg 660. P46 pressure data. + U16 temperatureP46; ///< Reg 662. P46 temperature data. + S16 pressureM3; ///< Reg 664. M3 pressure data. + U16 temperatureM3; ///< Reg 666. M3 temperature data. + S16 pressureP8; ///< Reg 668. P8 pressure data. + U16 temperatureP8; ///< Reg 670. P8 temperature data. + S16 pressureP13; ///< Reg 672. P13 pressure data. + U16 temperatureP13; ///< Reg 674. P13 temperature data. + S16 pressureP17; ///< Reg 676. P17 pressure data. + U16 temperatureP17; ///< Reg 678. P17 temperature data. + U16 p40PumpTachCount; ///< Reg 680. P40 pump tachometer counter. + U08 p25LevelSwitch; ///< Reg 682. P25 level switch. + U08 reserved4; ///< Reg 683. Reserved. + U32 conductivityP9Data; ///< Reg 684. P9 conductivity sensor data. + U16 conductivityP9Cond; ///< Reg 688. P9 conductivity sensor conductivity. + U16 conductivityP9Temp; ///< Reg 690. P9 conductivity sensor temperature. + U08 conductivityP9ReadCount; ///< Reg 692. P9 conductivity sensor read counter. + U08 conductivityP9ErrorCount; ///< Reg 693. P9 conductivity sensor error counter. + U32 conductivityP18Data; ///< Reg 694. P18 conductivity sensor data. + U16 conductivityP18Cond; ///< Reg 698. P18 conductivity sensor conductivity. + U16 conductivityP18Temp; ///< Reg 700. P18 conductivity sensor temperature. + U08 conductivityP18ReadCount; ///< Reg 702. P18 conductivity sensor read counter. + U08 conductivityP18ErrorCount; ///< Reg 703. P18 conductivity sensor error counter. + U16 flowRateP7; ///< Reg 704. P7 flow sensor rate. + U16 flowTempP7; ///< Reg 706. P7 flow sensor temperature. + U16 p12PumpTachCount; ///< Reg 708. P12 pump tachometer counter. + U16 d79SpeedPulseWidth; ///< Reg 710. D79 pusle width feedback. + U16 flowIntTempP7; ///< Reg 712. P7 flow sensor internal temperature. + U08 valveIOControlReadback; ///< Reg 714. IO Valve control bits read back. + U08 valveFPControlReadback; ///< Reg 715. FP Valve control enable read back. + U08 valveIOPWMEnableReadback; ///< Reg 714. IO Valve PWM enable read back. + U08 valveFPPWMEnableReadback; ///< Reg 715. FP Valve PWM enable read back. + U16 p12PumpPWMReadback; ///< Reg 718. P12 pump PWM read back. + U16 p40PumpPWMReadback; ///< Reg 720. P40 pump PWM read back. + U08 p7flowReadCount; ///< Reg 722. P7 Flow sensor read counter. + U08 p7flowErrorCount; ///< Reg 723. P7 Flow sensor error counter. + U16 fpgaD87PresPressure; ///< Reg 724. D87 MPM pressure sensor RAW pressure data + U16 fpgaD87PresTemp; ///< Reg 726. D87 MPM pressure sensor RAW temperature data + U32 fpgaD99Temp; ///< Reg 728. D99 temperature sensor + U32 tempTax1; ///< Reg 732. ( Tax1 ) temperature sensor reading. + U32 tempRTD; ///< Reg 736. spare temperature sensor reading. + U08 ad7124errcnt; ///< Reg 740. Counter which increments when an invalid transaction happen between FPGA and AD7124. + U08 ad7124readcnt; ///< Reg 741. Counter which increments when a valid transaction happens between FPGA and AD7124. + U16 flowRateP16; ///< Reg 742. P16 flow sensor rate. + U16 flowTempP16; ///< Reg 744. P16 flow sensor temperature. + U16 flowIntTempP16; ///< Reg 746. P16 flow sensor internal temperature. + U08 p16flowReadCount; ///< Reg 748. P16 Flow sensor read counter. + U08 p16flowErrorCount; ///< Reg 749. P16 Flow sensor error counter. + + U32 fpgaD74CondDataOut; ///< Reg 750. Data read from Conductivity Sensor D74 register + U16 fpgaD74CondCond; ///< Reg 754. D74 conductivity + U16 fpgaD74CondTemp; ///< Reg 756. D74 Temperature + U08 fpgaD74CondReadCnt; ///< Reg 758. D74 successful read count + U08 fpgaD74CondErrorCnt; ///< Reg 759. D74 error read count + U32 fpgaD11PumpHallSense; ///< Reg 760. Concentrate pump D11_Pump hall sensor pulse width + U32 fpgaD10PumpHallSense; ///< Reg 764. Concentrate pump D10_Pump hall sensor pulse width + U32 fpgaD76PumpHallSense; ///< Reg 768. UF D76_Pump hall sensor pulse width + U32 fpgaTestBytes; ///< Reg 772. FPGA Test 4 bytes } DD_FPGA_SENSORS_T; typedef struct @@ -298,58 +279,76 @@ 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 - U16 fpgaRemoteUpdate_Write; ///< Reg 18. Register for Remote update used by SW. - U16 fpgaD12PumpSpeed; ///< Reg 20. D48 Speed/RPM Control - U08 fpgaD12PumpControl; ///< Reg 22. DGP Control - U08 fpgaD48PumpControl; ///< Reg 23. SDP Control - U16 fpgaD48PumpSpeed; ///< Reg 24. SDP Speed/RPM Control - U08 fpgaD11PumpControl; ///< Reg 28. Acid Concentrate Pump Control - U08 fpgaD10PumpControl; ///< Reg 29. BiCarb Concentrate Pump Control - U08 fpgaD42SensorTest; ///< Reg 32. Blood leak sensor test - U08 fpgaD42UARTControl; ///< Reg 33. Blood leak sensor UART control - U08 fpgaD42FIFOTx; ///< Reg 34. Blood leak sensor FIFO transmit control - U08 fpgaD5HeaterPWMControl; ///< Reg 35. Primary heater PWM control - U08 fpgaD45HeaterPWMControl; ///< Reg 36. Trimmer heater PWM control - U08 fpgaD79PWMPumpCtl; ///< Reg 37. Rinse pump PWM control - U16 fpgaVBCPWMLow; ///< Reg 38. VBC PWM low ( Balancing chamber valves) - U16 fpgaVBCPWMPeriod; ///< Reg 40. VBC PWM period - U16 fpgaVBCPWMPullIn; ///< Reg 42. VBC PWM pull in - U16 fpgaVSPPWMLow; ///< Reg 44. VSP PWM low ( Spare valves ) - U16 fpgaVSPPWMPeriod; ///< Reg 46. VSP PWM period - U16 fpgaVSPPWMPullIn; ///< Reg 48. VSP PWM pull in - U16 fpgaD11PumpRevCount; ///< Reg 50. Acid Concentrate pump revolution count - U16 fpgaD10PumpRevCount; ///< Reg 52. Bicarb Concentrate pump revolution count - U08 fpgaADCControl; ///< Reg 54. FPGA internal ADC Control register for debugging - U08 fpgaGPIOControl; ///< Reg 55. FPGA GPIO control interface - U16 fpgaACRelayPWMLow; ///< Reg 56. Length of time in 10us resoultion that PWM output stays low. - U16 fpgaACRelayPWMPeriod; ///< Reg 58. PWM period for AC relay/heater. - U16 reserved1; ///< Reg 60. Reserved - U16 fpgaD76PumpRevCount; ///< Reg 62. UF pump revolution count - U08 fpgaD76PumpControl; ///< Reg 64. UF Pump Control - U08 reserved2; ///< Reg 65. Reserved - U08 valveIOControl; ///< Reg 66. IO Valve control register. - U08 valveFPControl; ///< Reg 67. FP Valve control register. - U16 descalePumpSpeed; ///< Reg 68. Descaler pump speed register. - U08 descalePumpControl; ///< Reg 70. Descaler pump control register. - U08 p12PumpControl; ///< Reg 71. P12 pump control register. - U16 valveIOFPPWMLow; ///< Reg 72. Valve VWi PWM low pulse period in 0.1 uSec. - U16 valveIOFPPWMPeriod; ///< Reg 74. Valve VWi PWM full period in 0.1 uSec. - U16 valveIOFPPWMPullIn; ///< Reg 76. Valve PWM high pulse period when valve is on in 0.1 uSec. - U16 p12PumpPWMDutyCyclePct; ///< Reg 78. P12 pump PWM duty cycle in percentage. - U16 p40PumpPWMDutyCyclePct; ///< Reg 80. P40 pump PWM duty cycle in percentage. - U08 p40PumpControl; ///< Reg 82. P40 pump control register. - U08 reserved3; ///< Reg 83. Reserved. - U08 flowControlp7; ///< Reg 84. P7 AVS Romer flow sensor control register. - U08 flowAddressp7; ///< Reg 85. P7 AVS Romer flow sensor I2C slave address register. - U08 valveIOPWMEnable; ///< Reg 86. Valve IO PWM enable register. - U08 valveFPPWMEnable; ///< Reg 87. Valve FP PWM enable register. - U08 flowControlp16; ///< Reg 88. P16 AVS Romer flow sensor control register. - U08 flowAddressp16; ///< Reg 89. P16 AVS Romer flow sensor I2C slave address register. - U08 reserved4; ///< Reg 90. Reserved. - U32 fpgaD11PumpSpeed; ///< Reg 92. Acid Concentrate Pump Speed/RPM Control - U32 fpgaD10PumpSpeed; ///< Reg 94. BiCarb Concentrate Pump Speed/RPM Control - U32 fpgaD76PumpSpeed; ///< Reg 96. UF Pump Speed/RPM 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 fpgaNotUsed_1; ///< Reg 40. Not used + U08 fpgaD11PumpControl; ///< Reg 42. Acid Concentrate Pump Control + U08 fpgaD10PumpControl; ///< Reg 43. BiCarb Concentrate Pump Control + U16 fpgaNotUsed_2; ///< Reg 44. Not used + 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 fpgaNotUsed_3; ///< Reg 74. Not Used + 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 fpgaNotUsed_4; ///< Reg 125. Not used + 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_T; #pragma pack(pop) @@ -851,7 +850,7 @@ * @param stepSpeed The concentrate pump step speed period * @return none *************************************************************************/ -void setFPGAD11PumpSetStepSpeed( U16 stepSpeed ) +void setFPGAD11PumpSetStepSpeed( U32 stepSpeed ) { fpgaActuatorSetPoints.fpgaD11PumpSpeed = stepSpeed; } @@ -865,7 +864,7 @@ * @param stepSpeed The concentrate pump step speed period * @return none *************************************************************************/ -void setFPGAD10PumpSetStepSpeed( U16 stepSpeed ) +void setFPGAD10PumpSetStepSpeed( U32 stepSpeed ) { fpgaActuatorSetPoints.fpgaD10PumpSpeed = stepSpeed; } @@ -879,7 +878,7 @@ * @param stepSpeed The concentrate pump step speed period * @return none *************************************************************************/ -void setFPGAD76PumpSetStepSpeed( U16 stepSpeed ) +void setFPGAD76PumpSetStepSpeed( U32 stepSpeed ) { fpgaActuatorSetPoints.fpgaD76PumpSpeed = stepSpeed; } @@ -1493,7 +1492,7 @@ * @details \b Outputs: none * @return concentrate pump D11_Pump hall sense pulse width *************************************************************************/ -U16 getFPGAD11PumpHallSensePulseWidth( void ) +U32 getFPGAD11PumpHallSensePulseWidth( void ) { return fpgaSensorReadings.d11HallSense; } @@ -1506,7 +1505,7 @@ * @details \b Outputs: none * @return concentrate pump D10_Pump hall sense pulse width *************************************************************************/ -U16 getFPGAD10PumpHallSensePulseWidth( void ) +U32 getFPGAD10PumpHallSensePulseWidth( void ) { return fpgaSensorReadings.d10HallSense; } @@ -1519,7 +1518,7 @@ * @details \b Outputs: none * @return ultrafiltration pump D76_Pump hall sense pulse width *************************************************************************/ -U16 getFPGAD76PumpHallSensePulseWidth( void ) +U32 getFPGAD76PumpHallSensePulseWidth( void ) { return fpgaSensorReadings.d76HallSense; }