AnsweredAssumed Answered

Junk data before/after waveform when cyclic disabled

Question asked by brandonj on Feb 13, 2015
Latest reply on Feb 26, 2015 by brandonj

I am selecting cyclic when I use the libiio function iio_device_create_buffer(...).


With fairly recent software (pulled last week) I am seeing that when cyclic is disabled there is an erroneous CW before and after my waveform buffer.


I've attached screenshots of the behavior. In this test I am transmitting an identical LFM waveform on all channels. I captured data on the scope by trigging on the leading edge of channel 1 when enabled and disabled. I "enable" by writing the data to the device buffer and pushing it. I "disable" by destroying the iio device buffer for TX. I believe this should toggle TX to the DDS, however I am setting the scale value of all DDS units and channels to 0.0 before I perform my test (just in case that's what I am observing). FYI, you can see the 10 MHz LFM chirp in the FFT channel (red) at the top of the scope "PreVu".


1) 10MHz_LFM_cyclic=off_enabled.png

2) 10MHz_LFM_cyclic=off_disabled.png


I then added a bartlett/triangular window and repeated the test and noticed that I don't observe the junk data (see *_retry.png). I suspect that because the head and tail of the waveform are zero-valued, there isn't any junk data.


3) 10MHz_LFM_cyclic=off_enabled_retry.png


4) 10MHz_LFM_cyclic=off_disabled_retry.png


To be sure I also queried the DMA register map and it appears that the cyclic flag is off (0x40c):


root@analog:~# cat /sys/kernel/debug/regmap/7c420000.dma/registers                                                                                                                                    

080: 00000000

084: 00000000

088: 00000000

400: 00000000

404: 00000000

408: 00000000

40c: 00000000

410: 00000000

414: 2784c000

418: 00003fff

41c: 00000000

420: 00000000

424: 00000000

428: 00000000

42c: 00000000

430: 00000000

434: 00000000

438: 27850000

43c: 00000000

440: 00000008


Is this normal behaviour or am I missing something?