server: add afe ctrl regs to parameters
This commit is contained in:
parent
7d732c0b87
commit
2618724aeb
34
fast-servo/linien-server-add-afe_ctrl-regs.patch
Normal file
34
fast-servo/linien-server-add-afe_ctrl-regs.patch
Normal file
@ -0,0 +1,34 @@
|
||||
diff --git a/linien-server/linien_server/parameters.py b/linien-server/linien_server/parameters.py
|
||||
index 287f304..fe482d7 100644
|
||||
--- a/linien-server/linien_server/parameters.py
|
||||
+++ b/linien-server/linien_server/parameters.py
|
||||
@@ -154,6 +154,16 @@ class Parameters:
|
||||
`error_signal_2_max`.
|
||||
"""
|
||||
|
||||
+ # ------------------- FAST SERVO PARAMETERS ---------------------------------------
|
||||
+ self.adc_afe_10x_gain_1 = Parameter(start=0, min_=0, max_=1, restorable=True)
|
||||
+ self.adc_afe_10x_gain_2 = Parameter(start=0, min_=0, max_=1, restorable=True)
|
||||
+ """
|
||||
+ Configures Fast INs AFE Gain:
|
||||
+ 0 --> 1x Gain
|
||||
+ 1 --> 10x Gain
|
||||
+ """
|
||||
+
|
||||
+
|
||||
# ------------------- GENERAL PARAMETERS ---------------------------------------
|
||||
|
||||
self.mod_channel = Parameter(start=0, min_=0, max_=1, restorable=True)
|
||||
diff --git a/linien-server/linien_server/registers.py b/linien-server/linien_server/registers.py
|
||||
index 365c254..2b8f697 100644
|
||||
--- a/linien-server/linien_server/registers.py
|
||||
+++ b/linien-server/linien_server/registers.py
|
||||
@@ -173,6 +173,8 @@ class Registers:
|
||||
gpio_n_do0_en=csrmap.signals.index("zero"),
|
||||
gpio_n_do1_en=csrmap.signals.index("zero"),
|
||||
logic_slow_decimation=16,
|
||||
+ # Fast Servo Paramters
|
||||
+ adc_afe_ctrl=(self.parameters.adc_afe_10x_gain_2.value << 1 | self.parameters.adc_afe_10x_gain_1.value)
|
||||
)
|
||||
|
||||
for instruction_idx, [wait_for, peak_height] in enumerate(
|
@ -34,6 +34,7 @@
|
||||
./fast-servo/linien-client-ssh-port-change.patch
|
||||
./fast-servo/linien-server-fast-servo.patch
|
||||
./fast-servo/linien-server-cli.patch
|
||||
./fast-servo/linien-server-add-afe_ctrl-regs.patch
|
||||
./fast-servo/linien-gateware-fast-servo.patch
|
||||
./fast-servo/linien-gateware-autolock-pipeline.patch
|
||||
./fast-servo/linien-module-iir-coeff-width-set-to-18bit.patch
|
||||
|
Loading…
Reference in New Issue
Block a user