Getting error in running continuous sample data in AD9361 transceiver example

1 view (last 30 days)
Hi All,
i am tring to run AD9361 example model. with default random integer under payload section the model works fine and i am able change the parameters using filterwizard. But when i am trying to add data source under txdata (random integer) by sampling an audio file using multi media block .
I am geting this error " Error in 'ad9361_qpsk_Tx_test/QPSK_TX/Unbuffer': All sample times must be discrete. No continuous or constant sample times are allowed."
But how to resolve this issue as actual data will always come as continuous sample.

Accepted Answer

Jieming Xu
Jieming Xu on 12 Mar 2021
Hi Mainak,
Just want to make sure you are using the multi media block in this link. If it is the case, I think it may cause some sampleing rate mismatch issue in simulink and AD9361.
My suggestion is that, may be you can first load your audio signal into the work space and use From Workspace block to load data from your workspace to simulink.
Best regards,
Jieming Xu
  1 Comment
mainak GH
mainak GH on 17 Mar 2021
Edited: mainak GH on 17 Mar 2021
Yes i am using multimedia block . Thanks for pointing out .
I am posting reading audio file coe which i have tried . it reads frame by frame and in my case after 345 frame it created the MAT file
fpassband=21000;
desiredFs=48000;
NormFc=21000/48000;
[x,OriginalFs] = audioread("file.mp3"); % y samples from audio with Fs sampling frequency in [Hz].
N = length(x); % sample lenth
duration_audio=N/OriginalFs;
afr = dsp.AudioFileReader('file.mp3','ReadRange',[1 8.007*desiredFs]);% Use duration_audio
while ~isDone(afr)
audio_frame = afr();
audio_frame_singleCH=audio_frame(:,1);
framecnt=framecnt+1;
end
save("audio_frame_full.mat","audio_frame_full");
release(afr)
Now as my data is ADC coverted and single frame is 24576 bit. Should i read the sigle frame and pack in single payload data or i need to split this data? As the communication frame size is getting bigger if i use this approach.
Also in the zedboard has ADAU chip which is sampling at 24Mhz . How to mimic the funtionality as the DSP.audioreader is sampling at 1k of the Mp3. Then the actual FPGA baseband area which is sampling at 100Mhz . Will it not create too much interpolated data ?

Sign in to comment.

More Answers (0)

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!