AnsweredAssumed Answered

SDMA transfer between EIM and memory problem

Question asked by 冈宇 李 on Nov 4, 2016
Latest reply on Jun 24, 2018 by chao sun

Hi community,

      We have a board using IMX6UL. It is needed to transfer data between CPU and FPGA via EIM interface, and with DMA mode. The kernel version we used is 3.14.38.
      Because the weim.DATA pin is used for, I configure the EIM interface to multiplexed mode(MUM=1), 16-bit datawidth(DSZ=001), and synchronous read/write(SRD=1, SWR=1), BCLK divide EIM clock by 1(BCD=1) . The EIM register is configured as follow:

      I modified the test module (mxc_sdma_memcopy_test) which get from community.(See attach) Now I can capture singnal on EIM interface from FPGA. And the timing is basically my expected.
      Now I have two problem:
      1、There is a interval every 32 bytes data when transfer data between memory and EIM with SDMA.
interval every 32-byte
     No matter I configure the burst length to 4/8/16/32 words, it is a interval erery 32-byte transfer. For my configure, 32-byte is 16 words(DSZ=001, 1 word is 2 byte),so when I configure the burst length to 32 words,one burst read or write is also only 16 words.
      What is the reason of this interval? How can I eliminate or shorten this interval?
      2、The timing of EIM interface when transfer from EIM to memory with SDMA is as my expected, but when I check the data in rbuf after transfer , the read data is error: some data is read twice and some data is lost. As follow is the timing I capture at FPGA:
DMA burst read data error

The expected read data is:

dst data_0 : 00070006

dst data_1 : 00090008

dst data_2 : 000b000a

dst data_3 : 000d000c

dst data_4 : 00150014

dst data_5 : 00170016

dst data_6 : 00190018

dst data_7 : 001b001a


      But the print result is:

dst data_0 : 00070006

dst data_1 : 00080007

dst data_2 : 00090008

dst data_3 : 000a0009

dst data_4 : 000c000c

dst data_5 : 000d000d

dst data_6 : 0000000e

dst data_7 : 000f0000

The second burst transfer data is almost lost. Is there something wrong with my configure for EIM? Or there is something I

should change when using SDMA for transfer from EIM to memory?


Attach my SDMA test module and the wave capture from FPGA.




Original Attachment has been moved to: