ZHCUDB5B October 2019 – September 2025
## Update RX NCO
afeInst = 0 #AFE Instance of AFE79_INST_TYPE type. If using the EVM this should be 0.
rxChSel = 0 #Value to select the RX chain.Value 0 for RXA to 3 for RXD.
bandNo = 0 #Band number. 0-band0, 1-band1.
ncoNo = 0 #NCO number. 0-NCO0, 1-NCO1.
ncoFreq = 7200#NCO frequency to set the NCO to in MHz.
if sysParams.ncoFreqMode == '1KHz':
mixer = ncoFreq*1e3 #Should pass value in KHz in 1KHz ncoFreqMode and the frequency word value in FCW mode.
elif sysParams.ncoFreqMode == 'FCW':
mixer = int(round(2**32*ncoFreq/sysParams.FadcRx)) #Should pass value in KHz in 1KHz ncoFreqMode and the frequency word value in FCW mode.
CAFE.updateRxNco(afeInst,rxChSel,mixer,bandNo,ncoNo)
engine.DDCNCOFreqWord=((ncoFreq)%sysParams.FadcRx)/(sysParams.FadcRx)*2**32 #Updating NCO word in capture window
## Update TX NCO
afeInst = 0 #AFE Instance of AFE79_INST_TYPE type. If using the EVM this should be 0.
txChSel = 0 #Value to select the TX chain.Value 0 for TXA to 3 for TXD.
ncoNo = 0 #NCO number. 0-NCO0, 1-NCO1.
band0NCO0 = 2600000 #NCO frequency to set the band 0 NCO0 to in KHz.
band1NCO0 = 2600000 #NCO frequency to set the band 1 NCO0 to in KHz.
band0NCO1 = 3500000 #NCO frequency to set the band 0 NCO1 to in KHz.
band1NCO1 = 3500000 #NCO frequency to set the band 1 NCO1 to in KHz.
CAFE.updateTxNcoDb(afeInst,txChSel,ncoNo,band0NCO0,band1NCO0,band0NCO1,band1NCO1)