AnsweredAssumed Answered

SDMA transfer between EIM and memory problem

Question asked by 冈宇 李 on Nov 4, 2016
Latest reply on Mar 8, 2018 by 冈宇 李

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 lcdif.data, 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:
   EIM_CSnGCR1:0x7111019F
   EIM_CSnGCR2:0x00000808
   EIM_CSnRCR1:0x03000000
   EIM_CSnRCR2:0x00000000
   EIM_CSnWCR1:0x01012480
   EIM_CSnWCR2:0x00000000
   EIM_WCR:0x00000028

      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: mxc_sdma_memcopy_test.c.zip

Outcomes