Wiki

This version is outdated by a newer approved version.DiffThis version (24 Dec 2021 12:11) was approved by Darius B.The Previously approved version (18 Mar 2021 08:51) is available.Diff

This is an old revision of the document!


DAC_DMA_EXAMPLE demo

DAC_DMA_EXAMPLE is a standard example that sends a sinewave on Tx channels using DMA from a lookup table. If you physically loopback a Tx channel to an Rx channel via an electrical wire, you may run the DAC_DMA_EXAMPLE and read the received data at Rx from particular memory address.

To build the DAC_DMA_EXAMPLE demo, edit the Makefile and add -DDAC_DMA_EXAMPLE to CFLAGS and rebuild. Alternatively, you may simply add a #define DAC_DMA_EXAMPLE in a suitable place in code and rebuild.

To run the DAC_DMA_EXAMPLE, you simply need to run the application as usual by:

  • making sure it was built with the DAC_DMA_EXAMPLE flag, as already mentioned
  • monitoring the serial terminal for messages printed by the application

The application will eventually print something like this:

DAC_DMA_EXAMPLE: address=0x7f170 samples=65536 channels=4 bits=16

This means that the memory address where the data at Rx is stored is 0x7f170, there are in total 65536 samples, 16-bit wide across 4 channels, which is equivalent to 16384, 16-bit samples per channel.

At this point you may use a Tcl script to retrieve data from memory and store it into .csv files for processing:

xsct legacy/scripts/xilinx_capture.tcl ZYNQ_PS7 0x7f170 65536 4 16 # for Zynq-7000
xsct legacy/scripts/xilinx_capture.tcl ZYNQ_PSU 0x7f170 65536 4 16 # for ZynqMP
resources/no-os/dac_dma_example.1640344235.txt.gz · Last modified: 24 Dec 2021 12:10 by Darius B