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: 
Observer yunusy
Observer
2,698 Views
Registered: ‎03-13-2014

Problem using DMA to copy data from Linear QSPI when caches are enabled

Hi. 

My problem is when I try to copy data from LQspi flasht to memory by using DMAC.

In fact I can succesfully copy data, I can see the memory values from  'Variables' window, but problem starts when the code continues running.

 

Here is my pseudo for DMA Copy(LQSPI)

  1. Enable LQSPI Mode
  2. Start DMA Copy( Flush source, invalidate destination)
  3. Wait for DMA Done Interrupt Handler
  4. (Wait for some time)
  5. Disable LQSPI Mode

 

If I don't put a 'wait for some time' right after the execution of 'DMA Done Handler', my program stucks at an irrelevant part of code and I can't stop the processor. This 'wait for some time' depends on the size of data copied. e.g 1ms is enough for 4KB copy but not enough for 1MB copy.

 

 

  • If caches are disabled, code continues running without problem.
  • When I delay(Step 4) disabling the LINEAR Qspi mode(Step 5), everything goes fine(when caches are ENABLED).

What can be the reason of my problem, any suggestions ?

 

0 Kudos
4 Replies
Observer yunusy
Observer
2,697 Views
Registered: ‎03-13-2014

Re: Problem using DMA to copy data from Linear QSPI when caches are enabled

Can it be that DMAC is still doing something with source addresseven after DMA Done Interrupt (may be related to cache) and when I disabled LQSPI mode immediately, Source Address becomes unavailable for memory read hence DMAC can't do its work on Source Address? ?

0 Kudos
Explorer
Explorer
2,411 Views
Registered: ‎11-12-2007

Re: Problem using DMA to copy data from Linear QSPI when caches are enabled

Hi,

are there any updates on this issue?

0 Kudos
Visitor anders.widen
Visitor
1,538 Views
Registered: ‎09-25-2015

Re: Problem using DMA to copy data from Linear QSPI when caches are enabled

Having the exact same problem:

 

I'm trying to read a large memory and do bank-selects between transfering in linear mode.

 

1. I/O-mode

2. Select bank

3. Linear Mode

4. DMA transfers the complete bank.

5. <Wait>, back to step 1.

 

If I don't wait ~50 millisec beore disabling linear-mode (step 5). The Zynq becomes unresponsive. The debugger looses connection and I can't even reprogram without doing a power-cycle.

 

It seems to lock when disabling the controller.

"Disable controller. Set qspi.En_REG[SPI_EN] = 0."

 

Doing a memcpy in linear-mode instead of using DMA works, but is too slow.

 

 

Any update?

 

0 Kudos
Visitor anders.widen
Visitor
1,525 Views
Registered: ‎09-25-2015

Re: Problem using DMA to copy data from Linear QSPI when caches are enabled

EDIT: 50 microsec, not milli.
0 Kudos