aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm
diff options
context:
space:
mode:
authorLars Amsel <lars.amsel@ni.com>2021-10-01 14:59:26 +0200
committerAaron Rossetto <aaron.rossetto@ni.com>2022-01-10 14:55:44 -0600
commit0e7553cd1a8758a8488afc2efaff7295b351e7fe (patch)
treef4ca9535e68f520da4baa730482b5cda1138afb2 /mpm/python/usrp_mpm
parent4725e97c6d6baa82d414ea89623ca32732d9bea1 (diff)
downloaduhd-0e7553cd1a8758a8488afc2efaff7295b351e7fe.tar.gz
uhd-0e7553cd1a8758a8488afc2efaff7295b351e7fe.tar.bz2
uhd-0e7553cd1a8758a8488afc2efaff7295b351e7fe.zip
MPM: X410: Set correct tuning word
The comment behind the tuning word is correct but 0x200 does not give a voltage of 1.65V but 2.5V, because the full range of the DAC is 5V not 3.3V).
Diffstat (limited to 'mpm/python/usrp_mpm')
-rw-r--r--mpm/python/usrp_mpm/periph_manager/x4xx_clk_aux.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/x4xx_clk_aux.py b/mpm/python/usrp_mpm/periph_manager/x4xx_clk_aux.py
index fcd655d9d..f8dc83a06 100644
--- a/mpm/python/usrp_mpm/periph_manager/x4xx_clk_aux.py
+++ b/mpm/python/usrp_mpm/periph_manager/x4xx_clk_aux.py
@@ -17,7 +17,13 @@ from usrp_mpm.sys_utils.udev import get_eeprom_paths_by_symbol
from usrp_mpm.sys_utils import i2c_dev
from usrp_mpm.chips import LMK05318
-X400_CLKAUX_DEFAULT_TUNING_WORD = 0x200 # 1.65V which would be a DAC value of 512
+# DAC AD5338R provides V_out = V_ref * gain (tune_word / 2^N)
+# We have gain pin enabled (2) and N = 10 for the AD5338 models
+# to provide 1.65V to the OCXO we need:
+# tune_word = 1.65V / (2.5V * 2) * 2^10
+# Note: V_vdd = 3.3V so V_out will saturate at 3.3V (it won't reach 5V)
+# the tuning word is therefore limited to 0x2A4
+X400_CLKAUX_DEFAULT_TUNING_WORD = 0x152
X400_CLKAUX_DEFAULT_REVISION = 0x1
X400_CLKAUX_I2C_LABEL = 'clkaux_i2c'
X400_CLKAUX_SPI_LABEL = 'clkaux_spi'