UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
3,996 Views
Registered: ‎07-30-2014

Reinitializing AXI CDMA

I am using an AXI CDMA in my embedded design. I follow the recommended way of setting the peripheral (XAxiCdma_LookupConfig(), XAxiCdma_CfgInitialize()). The CDMA initializes and arms itself properly for a DMA transfer when it is set up for the first time -- i.e. either when:

  • The microblaze runs through the code of the ELF embedded within the bitstream / BIN file

    OR

  • The SDK debugger steps through the code while running on a bitstream that does not contain an ELF

However, I am experiencing problems setting up the CDMA when it has been previously set up. This happens, for example, when:

  • The FPGA is programmed with a BIN file containing the ELF, and a bitstream is programmed over it

    OR

  • The FPGA is programmed with a bitstream or BIN file containing the ELF, and the SDK debugger is launched over it

It seems that the CDMA never exits the reset sequence that is called during XAxiCdma_CfgInitialize(). It is continuously polling XAxiCdma_ResetIsDone().

 

I checked the peripheral's registers before calling XAxiCdma_CfgInitialize().

  1. In the case where the CDMA has not been initialized yet, all the registers contain zeros except the status register: SR = 0x00000002, which means DMA is idling.

  2. In the case where the CDMA has been initialized at least once, the source address, destination address and Bytes to Transfer (BTT) registers contain the information that match the DMA transfer that I wish to set up (i.e. it was setup previously). All other registers contain zeros, including the status register (i.e. SR=0x0 means DMA is busy).

 

There is obviously a work-around to this: erasing the BIN files before programming a BIT file, only using BIN/BIT files that do not contain an ELF when running the SDK debugger, etc. However, these work-arounds are really clumsy and slow down development time by a lot...

0 Kudos