Hi,
I am using the RFSoC MTS example for RFSoC 4x2. I want to modify the ADC threshold value. I have tried with this code and it doesn’t seem to change the value:
Configure threshold
ADC_TILE = 2
BLOCK = 1
for THRESHOLD in range(0,2):
ol.usp_rf_data_converter_1.adc_tiles[ADC_TILE].blocks[BLOCK].thresholds[THRESHOLD].Settings['ThresholdMode'] = 3 # Range: 0 to 3 (0-OFF, 1-sticky-over, 2-sticky-under and 3-hysteresis)
ol.usp_rf_data_converter_1.adc_tiles[ADC_TILE].blocks[BLOCK].thresholds[THRESHOLD].Settings['ThresholdAvgVal'] = 10 # Data must be below lower threshold for 10*8 4 GSPS RF-ADC samples
ol.usp_rf_data_converter_1.adc_tiles[ADC_TILE].blocks[BLOCK].thresholds[THRESHOLD].Settings['ThresholdOverVal'] = 600 # Measured in 14-bit unsigned LSBs
ol.usp_rf_data_converter_1.adc_tiles[ADC_TILE].blocks[BLOCK].thresholds[THRESHOLD].Settings['ThresholdUnderVal'] = 400 # Measured in 14-bit unsigned LSBs
ol.usp_rf_data_converter_1.adc_tiles[ADC_TILE].blocks[BLOCK]
print(f"Setting of THRESHOLD {THRESHOLD}: {ol.usp_rf_data_converter_1.adc_tiles[ADC_TILE].blocks[BLOCK].thresholds[THRESHOLD].Settings}")
And I print this:
Setting of THRESHOLD 0: {‘ThresholdMode’: 0, ‘ThresholdAvgVal’: 0, ‘ThresholdUnderVal’: 0, ‘ThresholdOverVal’: 0}
Setting of THRESHOLD 1: {‘ThresholdMode’: 0, ‘ThresholdAvgVal’: 0, ‘ThresholdUnderVal’: 0, ‘ThresholdOverVal’: 0}
Is there anything missing for the threshold to be really changed?