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.

C6678 PCIE EDMA error

Hi,

I encountered a problem, in below post have the  :

http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/323458/1126828.aspx#1126828

I use PCIE to connect  DM8168EVM and C6678EVM board , since EDMA transfer need physically contiguous memory, I use cmem to get physically contiguous memory,  but when I use HAL_writeDMA  function to transfer data from DM8168 to C6678's DDR3 , I can only transfer 1MBytes data , if data size exceed 1MBytes ,  the data is not correct. 

My question :

 How can I transfer a frame image (about 4MBytes)  to C6678 use EDMA? since DM8168 can not transfer 4MB data use HAL_writeDMA(kernel error), I transfer it In four transmission, but the data is not rigth  . The phenomenon shown in above URL.

Thanks, 

yang liu3

 

  • I am not familiar with DM8168EVM, assuming it runs some Linux OS then the Linux kernel would enumerate the 6678 as EP with several BARs, each BAR has a length. Which BAR is mapped to the DDR region of 6678 and is that long enough to cover 4MB?

    Regards, Eric

  • Thanks for your quick reply.

    DM8168 have a ARM core and run Linux OS, below is DM8168 lspci printf.

    root@dm816x-evm:/# lspci -v
    00:00.0 Class 0604: Device 104c:b800 (rev 01)
            Flags: bus master, fast devsel, latency 0
            Memory at <ignored> (32-bit, non-prefetchable)
            Memory at <ignored> (32-bit, prefetchable)
            Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
            Memory behind bridge: 21800000-218fffff
            Prefetchable memory behind bridge: 20000000-217fffff
            Capabilities: [40] Power Management version 3
            Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
            Capabilities: [70] Express Root Port (Slot-), MSI 00
            Capabilities: [100] Advanced Error Reporting

    01:00.0 Class 0480: Device 104c:b005 (rev 01)
            Flags: bus master, fast devsel, latency 0, IRQ 48
            Memory at 21800000 (32-bit, non-prefetchable) [size=1M]
            Memory at 21400000 (32-bit, prefetchable) [size=512K]
            Memory at 21000000 (32-bit, prefetchable) [size=4M]
            Memory at 20000000 (32-bit, prefetchable) [size=16M]
            Memory at 21490000 (32-bit, prefetchable) [size=4K]
            Memory at 21480000 (32-bit, prefetchable) [size=64K]
            Capabilities: [40] Power Management version 3
            Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
            Capabilities: [70] Express Endpoint, MSI 00
            Capabilities: [100] Advanced Error Reporting

    and in DM8168 side, it config 2G memory for inbound ,so it is long enough.

    but if I tansfer 4MB data, Linux kernel crash, can you help me ? Thanks

  • Which BAR of below you are using to access DDR3 of 6678:

     01:00.0 Class 0480: Device 104c:b005 (rev 01)
            Flags: bus master, fast devsel, latency 0, IRQ 48
            Memory at 21800000 (32-bit, non-prefetchable) [size=1M]
            Memory at 21400000 (32-bit, prefetchable) [size=512K]
            Memory at 21000000 (32-bit, prefetchable) [size=4M]
            Memory at 20000000 (32-bit, prefetchable) [size=16M]
            Memory at 21490000 (32-bit, prefetchable) [size=4K]
            Memory at 21480000 (32-bit, prefetchable) [size=64K]
            Capabilities: [40] Power Management version 3
            Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
            Capabilities: [70] Express Endpoint, MSI 00
            Capabilities: [100] Advanced Error Reporting

    The 4M or 16M size BAR2/BAR3? In 6678 side, do you have emulator access, if yes, can you tell me the below regions (try to give me a screenshoot of CCS memory window for dozens of words length of memory):

    0x2180_1010  ====> BAR region

    0x2180_0200 =====> OB region

    0x2180_0300 ======> IB region

    Regards, Eric

     

     

  • Hi,

    I know the reason , the function HAL_writeDMA(uint32_t srcAddr, uint32_t dstAddr, uint32_t size, uint32_t flag), and the size of it must be 1MB's multiple, my image size is 1920*1080*2 bytes, not  1MB's multiple. If the size is 1920*1080*2, Linux kernel crash, and if it is 0x400000,it can transfer and the data is correct.

    Regards,

    yang liu3