This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AFE7950EVM: Access of IQ Data from SendTone.py script

Part Number: AFE7950EVM

Hi,

I am using the latte software and TI has provided a script for CW single tone transmission.

The code is working and I am getting the output as well. However, I would like to get access of the IQ Data which is being generated while that code is run. The code is given below for reference - 

############ Send Signal to TX AB

amp1A=-20

freqA=20

amp1B=-10

freqB=20

AFE.selectCh(0,0)

AFE.FPGA.sendSingleTone(0,freqA,amp1A,freqB,amp1B)

Kindly suggest.

  • Hi YS,

    To get the IQ data that is being sent you can use the function below. Please note that the last parameter is the DAC data rate, DAC Sample Rate / Interpolation Factor. 

    Idata,Qdata=AFE.FPGA.toneGen(amp,freq,4096,DataRate)

    Regards,

    David Chaparro

  • Hi David, 

    I used this function in the code. I have DAC sample rate = 11796.48 and interpolation factor = 24. So, DAC data rate = 491.52. I used

     Idata,Qdata=AFE.FPGA.toneGen(-20,20,65536,491.52) for 20MHz baseband and -20 dBm amplitude.

    The IQ data getting saved has a .0 after every number Ex. 346534.0

    I have removed the point and transmit the same IQ data extracted from the function to cross-check but I am not getting the right output.

    Kindly suggest.

    Regards.

  • Hi YS,

    After reviewing the code it looks like the issue is that when the toneGen function is used internally it is not using exactly 65536 samples when creating the tone. 

    They use the below formula to calculate the exact number of samples to use. Please use this and you should see the issue fix. 

    nSamples = int(math.ceil(math.ceil(Samples/24.0)))*24 (This requires that you import the math module in your script)

    Regards,

    David Chaparro