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.

GPMC in burst mode and DMA access on AM3358

Hi,

i'am using the GPMC on a beaglebone to communicate with a FPGA. I recently moved to using the synchronous mode with burst access to improve reliability and speed. This mode works great as long as i'am using memcpy in kernel mode to copy data over the GPMC to the FPGA but when i try to use the EDMA the communication gets corrupted. When i specify a burst length of 16 (16 times 16 bit word) the transfer goes well for the first 16 words and then is corrupted for the next 16 words (then good again for the next 16 words). If i switch to 8 word burst length on the GPMC, the communication is good of the first 8 word then corrupted for the next 24 words.

From what i understand the EDMA tries to access the GPMC in 32 words burst length when the GPMC can only support 16 words max. Do you have any idea what causes this ? Do i need to configure the EDMA in a specific way or to use a specific channel number ?

Thanks

  • From section 7.1.3.3.12.4 "Prefetch and Write-Posting Engine" in the AM335X Technical Reference Manual, Rev. I, DMA access is available only for NAND-type memories.
  • The beagleboone-black camera cape uses the EDMA access with no problem for the same kind of access that i do (GPMC in synchronous mode with burst enabled), so i assume it should be working. The problem is i cannot tell what is the difference in the camera cape code compared to mine.  

  • From what I saw about this cape, the chip they use for interfacing to the GPMC sends out external DMA requests to AM335X pin XDMA_EVENT_INTR2, and the chip's default configuration is for 16x16-bit words per DMA request. About software I cannot say anything as it isn't public. In general Beaglebone/cape support is handled over on the http://www.beagleboard.org/Community/Forums
  • There code in the linux kernel, is not clear about the use of xdma_event. There DMA configuration consider transfers of 32 bytes for A-count (although there is an option for 128 bytes), so they may trick the DMA to get the expected behavior by limiting burst transfer to 16x16 bit on the DMA side.

  • I guess that the statement "DMA access is available only for NAND-type memories" does not apply here. Section 11.3.19.4.2 shows an example of how to read a video frame via "Bursting Peripherals" using the EDMA3 component. There is only one interface which is capable to yield the required bandwith and this is GPMC.


    The bad thing is, that there are still so many questions about how to do just this. The provided example is so short that it doesn't even say a word about GPMC. Wouldn't it be possible to provide a clear example which includes real Linux source code? There should also be a clear documentaion of how to program the EDMA part via Linux.