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.

AM6421: AM6421 AND Ethernet-IP Adaptor SDK9.2

Part Number: AM6421
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi,

    We are using Industrial Communication SDK V9.2.00.08  Ethernet-IP Adaptor Example.

    We have added IPC code to communicate to R5F1_0. core.

      We are  able to run the application through JTAG.with out any issue and all IPC with R5F1_0 core works well, Ethernet -IP Adapter works well..

        When we change to the same Application to work from Linux through Remoteproc . It does not work.

Below are the logs from Linux console.

root@am64xx-evm:~# ls -l /lib/firmware/mcusdk-benchmark_demo/
total 3024
-rw-r--r-- 1 root root 2030576 Apr 28 17:43 am64-main-r5f0_0-fw
-rw-r--r-- 1 root root 1053624 Apr 28 17:43 am64-main-r5f1_0-fw

root@am64xx-evm:~# dmesg | grep remoteproc
[ 10.623099] k3-m4-rproc 5000000.m4fss: configured M4 for remoteproc mode
[ 10.653947] remoteproc remoteproc0: 5000000.m4fss is available
[ 10.668211] remoteproc remoteproc0: Direct firmware load for am64-mcu-m4f0_0-fw failed with error -2
[ 10.668248] remoteproc remoteproc0: powering up 5000000.m4fss
[ 10.668332] remoteproc remoteproc0: Direct firmware load for am64-mcu-m4f0_0-fw failed with error -2
[ 10.668342] remoteproc remoteproc0: request_firmware failed: -2
[ 11.828478] platform 78000000.r5f: configured R5F for remoteproc mode
[ 11.848439] remoteproc remoteproc1: 78000000.r5f is available
[ 11.938461] platform 78400000.r5f: configured R5F for remoteproc mode
[ 11.959345] remoteproc remoteproc2: 78400000.r5f is available
[ 12.060850] remoteproc remoteproc1: powering up 78000000.r5f
[ 12.060885] remoteproc remoteproc1: Booting fw image am64-main-r5f0_0-fw, size 2030576
[ 12.073860] remoteproc remoteproc1: remote processor 78000000.r5f is now up
[ 12.139179] remoteproc remoteproc2: powering up 78400000.r5f
[ 12.139208] remoteproc remoteproc2: Booting fw image am64-main-r5f1_0-fw, size 1053624
[ 12.155753] remoteproc remoteproc2: remote processor 78400000.r5f is now up
[ 18.073691] remoteproc remoteproc3: 30034000.pru is available
[ 18.088879] remoteproc remoteproc4: 30004000.rtu is available
[ 18.107278] remoteproc remoteproc5: 3000a000.txpru is available
[ 18.125269] remoteproc remoteproc6: 30038000.pru is available
[ 18.138860] remoteproc remoteproc7: 30006000.rtu is available
[ 18.147407] remoteproc remoteproc8: 3000c000.txpru is available

root@am64xx-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc1/trace0
root@am64xx-evm:~#

There is no debug messages in trace0 file.

 We have one more applicatition running on R5F1_0 which is working fine.

The same is working when we have done with SDK 9.0

Please tell if any specific settings has to be done on sdk 9.2

Thank You.

  • Hello,

    Steps to resolve the issue

    Please refer to the AM64x academy, multicore section, Application development on Remote cores:
    https://dev.ti.com/tirex/explore/node?a=7qm9DIS__LATEST&node=A__AfSHr0vWbFdGCnmoPeMXzg__AM64-ACADEMY__WI1KRXP__LATEST

    Since you are able to initialize the R5F firmware with the Linux remoteproc driver, I assume that you successfully added a resource table to the remote core firmware. The next steps would be to check peripheral & memory allocation, as documented in the link above.

    If you do not uncover any peripheral or memory allocation conflicts, then you'd want to debug the remote core. Again, refer to the link above.

    Additional questions 

    What boot method are you using? SBL? SPL?

    Regards,

    Nick

  • Hi Nick,

     Thank you for the response.

     We have tried out as mentioned above by You.

    Now we are able to see the debug log in trace0 file.

     But application was not running correctly. So we debugged the R5F0_0 Ethernet-IP adapter application along side the Linux through JTAG. 

    We saw that it is getting stuck at below function

    void Module_clockSetFrequency(void)
    {
    int32_t status;
    uint32_t i = 0;

    while(gSocModulesClockFrequency[i].moduleId!=SOC_MODULES_END)
    {
    status = SOC_moduleSetClockFrequency(
    gSocModulesClockFrequency[i].moduleId,
    gSocModulesClockFrequency[i].clkId,
    gSocModulesClockFrequency[i].clkRate
    );
    DebugP_assertNoLog(status == SystemP_SUCCESS);
    i++;
    }
    }

    As per sysconfig below is the structure data generated by MCU SDK 

    uint32_t gSocModules[] = {
    TISCI_DEV_PRU_ICSSG1,

    SOC_MODULES_END,
    };

    SOC_ModuleClockFrequency gSocModulesClockFrequency[] = {
    { TISCI_DEV_PRU_ICSSG1, TISCI_DEV_PRU_ICSSG1_CORE_CLK, 200000000 },
    { TISCI_DEV_PRU_ICSSG1, TISCI_DEV_PRU_ICSSG1_UCLK_CLK, 192000000 },
    { TISCI_DEV_PRU_ICSSG1, TISCI_DEV_PRU_ICSSG1_IEP_CLK, 200000000 },

    { SOC_MODULES_END, SOC_MODULES_END, SOC_MODULES_END },
    };

    below are our logs from linux 


    root@am64xx-evm:~# dmesg | grep "remoteproc"
    [ 10.734650] k3-m4-rproc 5000000.m4fss: configured M4 for remoteproc mode
    [ 10.735363] remoteproc remoteproc0: 5000000.m4fss is available
    [ 10.751952] remoteproc remoteproc0: Direct firmware load for am64-mcu-m4f0_0-fw failed with error -2
    [ 10.751986] remoteproc remoteproc0: powering up 5000000.m4fss
    [ 10.752070] remoteproc remoteproc0: Direct firmware load for am64-mcu-m4f0_0-fw failed with error -2
    [ 10.752080] remoteproc remoteproc0: request_firmware failed: -2
    [ 11.931857] platform 78000000.r5f: configured R5F for remoteproc mode
    [ 11.954225] remoteproc remoteproc1: 78000000.r5f is available
    [ 12.016145] platform 78400000.r5f: configured R5F for remoteproc mode
    [ 12.051229] remoteproc remoteproc2: 78400000.r5f is available
    [ 12.156202] remoteproc remoteproc1: powering up 78000000.r5f
    [ 12.156234] remoteproc remoteproc1: Booting fw image am64-main-r5f0_0-fw, size 2022688
    [ 12.169886] remoteproc remoteproc1: remote processor 78000000.r5f is now up
    [ 12.248935] remoteproc remoteproc2: powering up 78400000.r5f
    [ 12.248964] remoteproc remoteproc2: Booting fw image am64-main-r5f1_0-fw, size 1053624
    [ 12.261506] remoteproc remoteproc2: remote processor 78400000.r5f is now up
    root@am64xx-evm:~#

    root@am64xx-evm:~# dmesg | grep "pru"
    root@am64xx-evm:~#

    in our device tree we have disabled both icssg0 & icssg1 as below


    &icssg1 {
    status = "disabled";
    };

    &icssg0 {
    status = "disabled";
    };

    Please suggest what to be done next.

    Thank You.

  • Hello Narasimha,

    Good progress! That would have caused an issue if both Linux and the remote core were trying to use the same ICSSG module.

    1) What boot method are you using? SPL, or SBL?

    2) Are you using a TI EVM, or a custom board?

    The boot method matters because in the SBL boot by default the ICSSG DMAs are assigned to the R5F cores, while in SPL they are assigned by default to the Linux cores. So if you are using SPL boot, you need to modify your settings to allocate to the R5F. Let me know, and I can point you to resources as needed.

    Regards,

    Nick

  • Hi Nick,

     Thank you for the response.

     1) What boot method are you using? SPL, or SBL?

        We are using SPL boot method.

    2) Are you using a TI EVM, or a custom board?

        We are using custom board.

     1)   Kindly refer to the logs sent by earlier in this post, the ICSSG are disabled in Linux.

            in the device tree we have disabled both icssg0 & icssg1 as below( This was working fine in SDK 9.0)


            &icssg1 {
                  status = "disabled";
            };

            &icssg0 {
             status = "disabled";
            };

          root@am64xx-evm:~# dmesg | grep "pru"
           root@am64xx-evm:~#

           by above dmesg  it shows there is no ICSSG or pru assigned to LINUIX.

     2)   Below shows the remoteproc available on Linux.

                elow are our logs from Linux 


             root@am64xx-evm:~# dmesg | grep "remoteproc"
            [ 10.734650] k3-m4-rproc 5000000.m4fss: configured M4 for remoteproc mode
            [ 10.735363] remoteproc remoteproc0: 5000000.m4fss is available
           [ 10.751952] remoteproc remoteproc0: Direct firmware load for am64-mcu-m4f0_0-fw failed with error -2
           [ 10.751986] remoteproc remoteproc0: powering up 5000000.m4fss
           [ 10.752070] remoteproc remoteproc0: Direct firmware load for am64-mcu-m4f0_0-fw failed with error -2
           [ 10.752080] remoteproc remoteproc0: request_firmware failed: -2
           [ 11.931857] platform 78000000.r5f: configured R5F for remoteproc mode
           [ 11.954225] remoteproc remoteproc1: 78000000.r5f is available
           [ 12.016145] platform 78400000.r5f: configured R5F for remoteproc mode
           [ 12.051229] remoteproc remoteproc2: 78400000.r5f is available
           [ 12.156202] remoteproc remoteproc1: powering up 78000000.r5f
           [ 12.156234] remoteproc remoteproc1: Booting fw image am64-main-r5f0_0-fw, size 2022688
           [ 12.169886] remoteproc remoteproc1: remote processor 78000000.r5f is now up
           [ 12.248935] remoteproc remoteproc2: powering up 78400000.r5f
           [ 12.248964] remoteproc remoteproc2: Booting fw image am64-main-r5f1_0-fw, size 1053624
           [ 12.261506] remoteproc remoteproc2: remote processor 78400000.r5f is now up
           root@am64xx-evm:~#

          We have allocated the ICSSG1 resource only in R5F.

          We have lot of pressure from end customer as the above was working fine on SDK 9.0 and migrating to SDK 9.2 is taking lot           more time than expected.

    Your advice and support is greatly appreciated  to resolve the issue at the earliest.

    Thank You.

  • Hi Nick,

       Any update. Your advice and support is greatly appreciated to resolve the issue at the earliest.

    Thank You.

  • Hi Nick,

       Any update. Your advice and support is greatly appreciated to resolve the issue at the earliest.

    Thank You.

  • Hi Nick,

       Any update. Your advice and support is greatly appreciated to resolve the issue at the earliest.

        We have to give a Release to customer.

    Thank You.

  • Hello Narasimha,

    Let's make sure that you updated the DMA allocations

    Just to make sure: did you correctly updated your ICSSG DMA allocation for the SPL boot, generate the yaml file, and rebuild uboot with the updated DMA settings?

    Here is a summary of the steps I want you to do, written for SDK 9.1:

    "If you are using SPL boot:

    You need to grab the AM64x default configuration from the K3 Resource Partition tool that I package in this FAQ here:
    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1308689/faq-how-to-use-k3-resource-partitioning-tool-with-processor-sdk-v9-0-or-v9-1

    As of SDK 9.0 & 9.1, you CANNOT use the version of the K3 Resource Partition tool that is packaged in the Linux SDK. You HAVE to use the version I packaged in the FAQ. (note, as of SDK 9.2 I think you should be able to use the version of the K3 Resource Partition tool packaged in the Linux SDK)

    Update the ICSSG DMA allocation as per my guidance from April 19, 2023 here:
    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1206420/processor-sdk-am64x-enet-open-failure-from-r5-when-a53-is-running/4596608#4596608

    Generate the yaml file and rebuild uboot as discussed in the FAQ with the K3 Resource Partition Tool download. Put the new uboot files on your SD card."

    What are the differences between your working SDK 9.0 & not working SDK 9.2 devicetree files? 

    What happens if you only initialize one of the R5F cores? does the other one work as expected? 

    Regards,

    Nick

  • Hello Narasimha,

    I understand you're under some time pressure, so I just wanted to give you an update: I will be on vacation from Friday until July 15. I am working today & tomorrow (Wednesday & Thursday) if you need any more input from me.

    Regards,

    Nick

  • Hi Nick,

              Thank you for your suggestions.

               After following the same, we are able to proceed further and execute the Ethernet-IP Adapter Application.

               Now we are testing the Complete Applications. If any issue, we will come back.

               Thank You again.

               Happy Vacation.

               

  • Hello Narasimha,

    Glad to hear things are working for you! Good luck with the rest of your software port.

    Regards,

    Nick