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 initialize in SBL and using in application

Part Number: AM5728

Tool/software: TI-RTOS

I'm using idkAM5728(using only one main cpu0)

I've done pci-e ep mode initialization based on ti-rtos application and test with windows PC.

Now, I need to initialize pci-e as soon as possible to make any windows PC can detect the board.

So, I'm planning to add pci-e initialization part into SBL. and my application will use pci-e with edma.

My system process is like this...

#1. SBL initialize pci-e ep until link is up. SBL doesn't do anything about edma.

     Then, load my application.

     SBL is based on bare-metal. so, pci-e initialization code will be similar to pci-e example in csl folder.     

#2. My application initialize only edma for pci-e.

      My app is based on ti-rtos. I'll use sys-bios edma and this code will be similar to example in MyExample\pci-e wSocLib.

      My appl doesn't initialize pci-e, because SBL's done it already.

Q1. Is this correct process for my usage?

Q2. Are there better way for this?

Q3. What if SBL initialize both pci-e and edma. Then my application just access/read/write memory block without any initialization for pci-e or edma? Is this okay?

TI always help me a lot. Thank you.

  • Hi,

    The first thing you need to do is to make sure PCIE worked as a standalone code (e.g, load by CCS/JTAG) can be enumerated by a Windows PC. This needs AM572x IDK HW changes and software change to configure AM572x IDK to use the PCIE reference clock from Windows PC. There are lots of discussion on this topics from E2E:

    e2e.ti.com/.../738397
    e2e.ti.com/.../653443
    e2e.ti.com/.../739791

    A1. Yes, you can use the PCIE example code in CSL style to add into SBL to initialize the PCIE interface without EDMA. Your goal here is to be able to enumerate the AM572x from the Windows PC. You can do memory R/W to AM572x. So you can download an application image to AM5728 via PCIE interface and let it runs.

    A2. Yes, you can use the application (downloaded from SBL) to initialize the EDMA portion only.

    A3. Another way is to use SBL both initializes the PCIE and EDMA. There is also bare metal style EDMA code under CSL under pdk_am57xx_1_0_x\packages\ti\csl\example\edma

    You just need to do the intialization of PCIE and EDMA once, either inside SBL, or application.

    Regards, Eric
  • Thanks a lot.

    I've done all the HW changes and checking PCI-E works with windows pc.

    This is what I've done for it.  https://e2e.ti.com/support/processors/f/791/t/742321

    Thank you!!

    Your answer gave me confidence for it.