From 3447a8f6eb1ba4b4eb3a18b61dfd63a0c1c79dcf Mon Sep 17 00:00:00 2001 From: eZio Pan Date: Tue, 27 Feb 2024 19:49:51 +0800 Subject: [PATCH] add enum --- data/registers/opamp_h7.yaml | 82 ++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/data/registers/opamp_h7.yaml b/data/registers/opamp_h7.yaml index 949d171..07fb6bb 100644 --- a/data/registers/opamp_h7.yaml +++ b/data/registers/opamp_h7.yaml @@ -24,26 +24,32 @@ fieldset/CSR: description: Force internal reference on VP (reserved for test. bit_offset: 1 bit_size: 1 + enum: FORCE_VP - name: VP_SEL description: Operational amplifier PGA mode. bit_offset: 2 bit_size: 2 + enum: VP_SEL - name: VM_SEL description: Inverting input selection. bit_offset: 5 bit_size: 2 + enum: VM_SEL - name: OPAHSM description: Operational amplifier high-speed mode. bit_offset: 8 bit_size: 1 + enum: OPAHSM - name: CALON description: Calibration mode enabled. bit_offset: 11 bit_size: 1 + enum: CALON - name: CALSEL description: Calibration selection. bit_offset: 12 bit_size: 2 + enum: CALSEL - name: PGA_GAIN description: allows to switch from AOP offset trimmed values to AOP offset. bit_offset: 14 @@ -60,6 +66,7 @@ fieldset/CSR: description: Operational amplifier calibration output. bit_offset: 30 bit_size: 1 + enum: CALOUT fieldset/HSOTR: description: OPAMP1 offset trimming register in low-power mode. fields: @@ -82,3 +89,78 @@ fieldset/OTR: description: Trim for PMOS differential pairs. bit_offset: 8 bit_size: 5 +enum/CALON: + bit_size: 1 + variants: + - name: Normal + description: Normal mode + value: 0 + - name: Calibration + description: Calibration mode (all switches opened by HW) + value: 1 +enum/CALOUT: + bit_size: 1 + variants: + - name: Less + description: Non-inverting < inverting + value: 0 + - name: Greater + description: Non-inverting > inverting + value: 1 +enum/CALSEL: + bit_size: 2 + variants: + - name: Percent3_3 + description: VREFOPAMP=3.3% VDDA. + value: 0 + - name: Percent10 + description: VREFOPAMP=10% VDDA. + value: 1 + - name: Percent50 + description: VREFOPAMP=50% VDDA. + value: 2 + - name: Percent90 + description: VREFOPAMP=90% VDDA. + value: 3 +enum/OPAHSM: + bit_size: 1 + variants: + - name: Normal + description: operational amplifier in normal mode + value: 0 + - name: HighSpeed + description: operational amplifier in high-speed mode + value: 1 +enum/VM_SEL: + bit_size: 2 + variants: + - name: Inm0 + description: INM0 connected to OPAMP_VINM input + value: 0 + - name: Inm1 + description: INM1 connected to OPAMP_VINM input + value: 1 + - name: Pga + description: Feedback resistor is connected to the OPAMP_VINM input (PGA mode), Inverting input selection depends on the PGA_GAIN setting + value: 2 + - name: Follower + description: opamp_out connected to OPAMP_VINM input (Follower mode) + value: 3 +enum/VP_SEL: + bit_size: 2 + variants: + - name: Gpio + description: GPIO connected to OPAMPx_VINP + value: 0 + - name: DacOut + description: dac_outx connected to OPAMPx_VINP + value: 1 +enum/FORCE_VP: + bit_size: 1 + variants: + - name: NormalOperating + description: Normal operating mode. Non-inverting input connected to inputs. + value: 0 + - name: CalibrationVerification + description: Calibration verification mode. Non-inverting input connected to calibration reference voltage. + value: 1 \ No newline at end of file