MATLAB: Question about how to run TX and RX calibration example model on zedboard with zynq

Embedded Codersimulinkzedboardzynq

I am doing an experiment: I combined the following two examples:
Transmitter example: https://ww2.mathworks.cn/help/supportpkg/xilinxzynqbasedradio/examples/frequency-offset-calibration-transmitter-using-analog-devices-ad9361-ad9364.html
Receiver example: https://ww2.mathworks.cn/help/supportpkg/xilinxzynqbasedradio/examples/frequency-offset-calibration-receiver-using-analog-devices-ad9361-ad9364.html
The combined model is shown in the image:
I have the boards: AD-FMCOMMS4-EBZ(which is AD9364) evaluation board) and Zedboard with Xilinx Zynq. when I run the model, the signal plotted in time scope is discontinuous sin wave but not continuous sin wave. | | Is the discontinuous sin wave plotted in time scope correct?||

Best Answer

Hi Ardeal,
Transmit and receive on one same hardware using Tx and Rx blocks is not recommended. As both documentation link you have shared are highlighting:
"
Make sure that you have both the transmitter script Frequency Offset Calibration Transmitter Using Analog Devices AD9361/AD9364 and the receiver script Frequency Offset Calibration Receiver Using Analog Devices AD9361/AD9364 open, with each configured to run on its own SDR hardware in its own instance of MATLAB.
"
If you give a look at the receiver block's "lost samples" output, you will likely see some frames being dropped. There will be performances issues by running both models on the same hardware at the same time.
I suggest you use the transmitRepeat function as highlighted here: Transmit and Receive On Single Device. You will be able to transmit and receive data on your device.
On a side note, these two scripts are meant to calibrate a frequency offset existing between two devices. There will be no frequency offset if the scripts are run on the same device.
I hope this helps you in your experiment!
Paul