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.

RTOS/AM5728: PCI-E EP Inbound and outbound

Part Number: AM5728

Tool/software: TI-RTOS

Hello~!!!

I'm using idkAM5728 as pci-e ep mode. The rc is windows PC.

I've done all HW changes and test with nice example in pdk.(clocking pcie-e by PC is working good)

Now, I'm checking all the parts of pci-e initialization in code.

I saw there are inbound&outbound&bar settings in csl/example/pcie/ep.

In my system, the shared memory block is on DDR3 which is in my board.

#1. PC read/write my shared memory block by pci-e .

#2. My application doesn't access any memory which is in the PC.

#3. My application read/write my shared memory block and send interrupt to PC.

My questions are...

Q1. I think I don't need outbound initialization at all. Because I don't read/write RC's memory. Is it correct?

Q2. I think I don't need to initialize edma for pci-e, Because It seems like pci-e just access(r/w) my shared memory block without edma. Is it correct?

Q3. In csl/example/pcie/ep, I don't see any mmu table setting for pci-e. Is this ok? My sbl which is non-os uses pci-e with this memory block, and my application which is based on ti-rtos use same memory block.

Thank you.

p.s : Is there any forum or board to post the things I organized for AM5728 custom board processing include pci-e, SBL, etc...??

        I'd love to share the informations about it. Because I've got lots of help from this forum.

  • Hi,

    Please note that due to US holiday the responses may be delayed until the week of November 26th.
  • Hi,

    Q1. The outbound setup is for the AM572x to initiate a transfer to write into or read from PC's memory via PCIE interface. If you don't want to R/W PC's memory, you don't need to set this up.

    Q2. The benefit of using EDMA is to boost up the PCIE throughput. If you use the CPU, then every PCIE TLP contains only 4-byte data payload (with a PCIE header about 24-28 bytes). If you use the EDMA, then the data payload can be up to 64 bytes (same 24-28 bytes header). Of course, the PC doesn't have the EDMA. You need to use the EDMA of the AM572x.

    The idea looks:

    - On the AM5728x side you setup several BAR masks

    -  After PC enumeration, the PC will allocates several memory blocks

    - You use one memory block to do inbound mapping into DDR, you use another memory block to map into AM572x EDMA register region

    - From the PC, you can program the EDMA registers such as OPT field (like SRC, DST address), then you write the EDMA ESR register to trigger a transfer between AM572x and PC's memory via PCIE. You can get high throughput. As the AMN572x initiates the transfer here, you need to configure the outbound translation.

    We don't have any PCIE + host PC example on AM57x. We have this for C6678 device (where Linux PC is the host and C6678 EVM is the PCIE endpoint). The PCIE initialization in done in SBL. On Linux side we have a driver to do CPU R/W, EDMA R/W. You can use this as a reference. The code can be downloaded from Then look at packages\ti\boot\examples\pcie.

    The user guide is missing. You can refer to the attached and take a look first. Then the packages\ti\boot\examples\pcie\linux_host_loader\pciedemo.c which is the Linux driver. The SBL code is under \packages\ti\boot\ibl\src\device\c66x, search for iblPCIeWorkaround(). The SBL code may not help at all given the PCIE IP is different. 5707.README.pdf

    Q3. You may need to check if the SBL has MMU setup properly. There should be a SBL_MMUInit() inside ti\boot\sbl folder. 

    Thanks for your suggestion to share your experience. The forum is the only place to hold all the discussions. We looked over all the posts from time to time and may summarize common topics into a FAQ (under  ) or an application note (under ). We will definitely put your contributions into the document.

    Regards, Eric

  • Thank you for wonderful answer...

    I'd like to check about edma.

    In my system, as you know, PC read/write my board's memory block by pci-e.

    In this process, do I need edma for PC's read/write access?

    I think edma is used when AM5728 try to read/write PC side memory.
  • Hi,

    EDMA is only available in AM57x side. You can use PC to read/write AM57x without EDMA. You can also use PC to setup the EDMA of the AM57x, then using PC to trigger an EDMA transfer for PC to read/write AM57x.

    "I think edma is used when AM5728 try to read/write PC side memory."
    =====> AM5728 read PC is equivalent to PC writes AM5728; AM5728 writes PC is equivalent to PC read AM57x

    Regards, Eric