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.

Pcie sample code for keystone II processor

Hi ,

I am trying to write a sample code for pcie which is use to communicate between keystone II processor and fpga chip , can anyone has reference ??

Regards,

prakash

  • Dear Prakash,
    Please install the latest MCSDK package and you can see some PCIe example code.
    C:\ti\pdk_keystone2_3_01_04_07\packages\exampleProjects\PCIE_K2HC66BiosExampleProject

    MCSDK download link for Kesytone-II
    software-dl.ti.com/.../index_FDS.html

    Also we have the latest processor SDK package but it has some bug in example, that's why I'm suggesting to use this MCSDK.

    Please let me know if any questions.
  • Hi Prakash Kumar,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com). Please read all the links below my signature.

    Thank you.

    Note: We strongly recommend you to create new e2e thread for your queries instead of following up on an old/closed e2e thread, new threads gets more attention than old threads and can provide link of old threads or information on the new post for clarity and faster response.

  • I have already downloaded the mcsdk (mcsdk_3_01_04_07.tar.gz), but it seems to be rtos sample example code (because it did not use the Kernel APIs ), can you suggest me any other sample code (because i have to write a device driver code for pcie ,this driver code should use the APIs present in "linux_xx_xx_xx/driver/pci/host/keystone-pcie.c file" ).
  • For PCIe device (EP), you can refer below sample code.

    /cfs-file/__key/communityserver-discussions-components-files/791/5226.2350.pciedemo.c

    PCIe Linux host loader demo codes have legacy interrupt usage when the EVM(C667x) is configured as EP mode. 

    Thank you.

  • Dear Prakash,

    can you suggest me any other sample code (because i have to write a device driver code for pcie ,this driver code should use the APIs present in "linux_xx_xx_xx/driver/pci/host/keystone-pcie.c file" ).

    By default, our Linux SDK has PCIe driver for RC mode, you have to develop the PCIe driver for FPGA in order to operate in EP mode.
    I presume that your K2H device will act as RC.
    If you have PCIe EP code for your FPGA then "lspci" to list the FPGA device.

    If you have two K2H boards then you can run Linux on one K2H board (RC mode) and run the following RTOS PCIe code on another K2H board (EP mode)
    We have tested like that and get succeed. Refer to below post.
    e2e.ti.com/.../1783216