This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Flyby DMA on the Delfino



Here's a handy tip.  Suppose your Delfino has to acquire a lot of data quickly and store it into external SRAM.  In my application, the data is coming from an imager at 10MSPS.  A reasonable solution is to DMA from the data source into external memory, but because this requires two external memory accesses, it takes twice as long as it needs to.  The correct solution is what is called "flyby" DMA:  the DMA controller enables the external data source onto the bus, sets up the correct SRAM address, and strobes the WR pulse.  Ah, but the Delfino doesn't support flyby DMA.  Except that it does, sorta.  The trick is to set up a DMA transfer from an internal source to external SRAM.  Then write 0's to GPCMUX1 and GPCDIR, turning port C back from a data bus into an input port.  This keeps the DMA controller from driving the data bus.  Then when you're ready to transfer, enable the data source onto the bus and turn on the DMA.

You can do a similar trick without DMA if you need to transfer a quick burst into external SRAM: use the RPT instruction, something like:

    MOVL XAR7,#ExtSRAM
    MOV AR0,#1000
    RPT AR0 || MOV *XAR7++,#0

If your external data source controls the timing, you will need to use the XREADY line to control the transfer speed.

This kind of thing is just the trick for loading data from line-scan cameras into external memory.  Of course, this technique makes it impossible for you to do external memory accesses while the transfer is going (because you've turned off the data bus), but it saves a significant amount of bus time, so it's sometimes worth the tradeoff.

-Jim MacArthur