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: How to integrate PCIE function to EtherCAT-Master reference design

Guru 10235 points

Part Number: AM5728
Other Parts Discussed in Thread: TIDEP0079, SYSBIOS

Tool/software: TI-RTOS

Hello, TI Experts,

 

Our customer plan to use AM5728 for their product.

And they sent us a question about adding PCIE function to below EtherCAT-Master reference design(TIDEP0079) by using TI-RTOS(PROCESSOR-SDK-RTOS-AM57X).

http://www.ti.com/lit/ug/tidubz1b/tidubz1b.pdf

 

They success to run individually below two RTOS project on TMDXIDK5728.

  - PCIE_idkAM572x_wSoCFile_armExampleProject

  - acontis EC-Master V2.9 for SYS/BIOS Project ( described in "5.2 Software" of tidubz1b.pdf )

 

Question:

  Are there any document and recommended way of integrating PCIE function into EtherCAT-Master reference design?

 

They try to add the PCIE project source codes including pcie_sample.c and Pcie_sample_wSoCFile.cfg to acontis EC-Master V2.9 for SYS/BIOS Project.

 

If there are any recommended way and related document such as merge to one TI-RTOS project to other TI-RTOS project, please tell us.

 

Best regards,

  • Hi,

    We have a RTOS template application showing how do we add a few simple drivers together as a starting point, including UART, GPIO, SPI etc. software-dl.ti.com/.../Examples_and_Demonstrations.html

    We don't have such examples to put PCIE and Ethercat together. But you can follow the same idea, for each standalone project, there is .cfg file with different RTSC modules, MMU settings, and compiler and linker options you need to merge. Then add the source code/header from one project into the other. In the main file, create separate tasks for Ethercat and PCIE.

    Regards, Eric
  • Hi,

    Thank you very much for your kindness.
    I really appreciate your help.
    I will send the answer to the customer.

    Best regards,
  • Part Number: AM5728

    Tool/software: TI-RTOS

    Hello, TI Experts,

     

    Our customer sent us additional question about adding PCIE function to below EtherCAT-Master reference design(TIDEP0079) from the below E2E thread.

    https://e2e.ti.com/support/processors/f/791/p/754452/2787857#2787857

     

    They tried to integrate the PCIE function to EtherCAT-Master reference design with below condition;

    ・EC-Master V3.0 Evaluation for AM57x for Processor SDK RTOS 4.2(for ICSS-PRU)

     http://www.acontis.com/eng/products/downloads/ethercat-for-ti-processors.html  

    ・PROCESSOR-SDK-RTOS-AM57X 04_02_00_09

    ・CCS:Version: 7.0.0.00042

     

    They success to run individually below two RTOS project on TMDXIDK5728 with both boot condition CCS loading and SD-boot.

    - PCIE_idkAM572x_wSoCFile_armExampleProject

    - EC-Master

     

    But they found strange behavior with PCIE integration in EC-Master.

    - They found success to run with CCS loading boot.

    - But they found hung-up(no response) with SD-boot.

     

    We analyzed detail by single step debug.

    And we found "Board_internalInitI2C()" is SKIPPED

    because "Board_obj.i2cHandle" is not initialized in NG case.

    (please refer attached pdf)

     

    Detail is like below;

    main()

    step into -> Board_init(boardCfg);

                       -> Board_pinmuxConfig()

                        -> Board_getIDInfo(&id);

                      -> if (Board_obj.i2cHandle == NULL)  

                                 { ret = Board_internalInitI2C(); }

     

    Question:

       Could you tell us how to initialize the "Board_obj.i2cHandle" ?

     

    We would also appreciate if you check the behavior on your TMDXIDK5728 with attached CCS project like below procedure.

    - Download & extract : EC-Master V3.0 Evaluation for AM57x for Processor SDK RTOS 4.2(for ICSS-PRU)

    - Unzip & Overwrite attached files into the above extracted folder :"Workspace\SYSBIOS_AM57x\EcMasterDemoICSS"

    - Import this project to CCS and "Set build Configuration -> Debug" & Build (add debug-flag in main())

    - copy MLO & app to SD & boot -> single step debug with Symbol debug methodology

     

    Best regards,

    ecat.pdf

     EcMasterDemoICSS.zip

  • Hi Matusan, could you please send me the password for unzipping CCS project? Maybe via private message?.. In the meantime, it seems something gets initialized differently between GEL file and MLO.. A wild guess, is there any linker command file in CCS properties -> General? if so, could you delete it, rebuild, and test?

    thank you,
    Paula
  • Hi, Paula

    Thank you very much for your kindness.

    I really appreciate your help.

     

    Oh. Sorry.

    Please use the below attached file.

    (I create "no-password zip".)

     

    Best regards,

    0207.EcMasterDemoICSS.zip

  • Hi Matusan, I haven't tested it yet. But, could you delete Linker Command file: AM572x.lds (Properties->general). I faced a similar issue in the past and it was due to conflicting .lds file.

    Let me know if this fix the issue.

    thank you,

    Paula

  • Hi,

    Thank you very much for your kindness.
    I really appreciate your help.

    We found success to run with SD-boot.
    It seems to be solved the problem by "deleting Linker Command file: AM572x.lds" from your adivce.
    Thank you.

    We would appreciate if you tell us some explanation about the mechanism of "Board_obj.i2cHandle" area initialization.
    - Which file has those parameter initialization?
    - Which line of the file should we refer?
    Our customer want to know the recommended way of those parameter initialization with TI-RTOS CCS project.

    Best regards,
  • Hi Matusan, I am glad the issue with SD Card was resolved. Probably AM572x.lds redefined some memory sections in a conflicting way.

    You can check I2C_drv.c for details I2C_open() details.

    Thank you,
    Paula
  • Hi, Paula,

    Thank you very much for your kindness.

    I really appreciate your help.

     

    We checked the I2C_open() by single-step debug methodology.

    I2C_open() seems to be executed after "if (Board_obj.i2cHandle == NULL)" in below;

    step into -> main()

                       -> Board_init(boardCfg);

                        -> Board_pinmuxConfig()

                         -> Board_getIDInfo(&id);

                            -> if (Board_obj.i2cHandle == NULL)  

                                 { ret = Board_internalInitI2C(); }

     

    Question:

    We found "Board_obj=0" at the beginning of the "main()" like below.

       - Could you tell us the related file name which has the source code of below part of initialization such as "Board_obj"?

       - Which line of the file should we refer?

    Best regards,

  • Hi Matusan, my apology, I missed you replied. I thought this E2E was closed..

    From code inspection, I see:

    Board_pinmuxConfig () -> calls Board_getIDInfo().
    And Board_getIDInfo(), initializes I2C.

    thank you,
    Paula