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.

PROCESSOR-SDK-AM64X: AM64x R5f Ethernet firmware

Part Number: PROCESSOR-SDK-AM64X

Hello,

We are using AM64x. We can use Ethernet from Linux side.

Now we need to use Ethernet firmware from R5f of AM64x.

We followed steps mentioned in link - https://dev.ti.com/tirex/explore/content/mcu_plus_sdk_am64x_09_01_00_41/docs/api_guide_am64x/EVM_SETUP_PAGE.html#EVM_FLASH_SOC_INIT

With this we do see the initial UART logs. But then the UDMA initialization fails with message -

Assertion @ Line: 1046 in /home/user/psdk_rtos_am64x-09_01_00/source/networking/enet/core/src/per/V1/cpsw.c: hCpsw->hRxRsvdFlow != NULL

On debugging we found that issue is Udma_init() -> UdmaRmInitPrms_init() -> Udma_rmGetSciclientDefaultBoardCfgRmRange() -> Sciclient_rmGetResourceRange()

 

Sciclient_rmGetResourceRange() is supposed to initialize rmDefBoardCfgResp members "rangeStart" and "rangeNum".

But, the rmDefBoardCfgResp members rangeStart and rangeNum variables stay Zero.

 

Due to this, "rmInitPrms->startMappedRxCh" and "rmInitPrms->numMappedRxCh" also stay zero.

 

Eventually, when the above values are used in Udma_rmAllocMappedRxCh() with preferredChNum being 16, the condition is not satisfied.

 

        /* Array bound check */

        if((preferredChNum >= rmInitPrms->startMappedRxCh[mappedChGrp]) &&

           (preferredChNum < (rmInitPrms->startMappedRxCh[mappedChGrp] + rmInitPrms->numMappedRxCh[mappedChGrp])))

How can we fix this ?

Has anyone used Ethernet firmware on AM64x R5f ?

Best regards,

Nandan Chaturbhuj

  • Are you booting the board with the NULL bootloader (SOC initialization binary), e.g. do you see the following output:

      Starting NULL Bootloader ...

    Or is this while still running Linux, with the board booted via U-Boot?

    If you're using U-Boot you're most likely missing a modification to the board RM config that is part of U-Boot. That board configuration tells the SysFW (which is what Sciclient is talking to) which peripherals you intend to use from which core. The default U-Boot configuration assigns the UDMA channels for Ethernet exclusively to the A53. You need to modify that config to change that to the R5f (or add the R5f in addition to the A53). There should be some post on E2E that explains how to do this.

    Please note I'm not TI. They might have other suggestions for you.

    Regards,

    Dominic

  • Not running Linux over here.

    Yes I am getting "Starting NULL Bootloader ... " .

    Your information is very insightful. Thank you.

    Where can I find the missing modification of board RM config which needs to go in U-boot ?

    Thank you again,

    Nandan Chaturbhuj

  • Hi Nandan,

    From what I understand, you are able to boot the board using SBL null and you see the below logs, is this correct?

    Starting NULL Bootloader ... 
    
    DMSC Firmware Version 9.1.6--v09.01.06 (Kool Koala)
    DMSC Firmware revision 0x9
    DMSC ABI revision 3.1
    
    INFO: Bootloader_runCpu:155: CPU r5f1-0  is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU r5f1-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU m4f0-0 is initialized to 400000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU a530-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU a530-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:207: CPU r5f0-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:207: CPU r5f0-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runSelfCpu:217: All done, reseting self ...

    After this, which example are you running? Are you getting the error during build or on running the example?

    Regards,

    Nitika

  • Hello,

    Yes I got the exact same log.

    After this we load and execute r5fss0-0_freertos_enet_cpsw_loopback.release.out

    No build errors.

    This is full uart log I got -

    Starting NULL Bootloader ... 
    
    DMSC Firmware Version 21.1.1--v2021.01a (Terrific Lla
    DMSC Firmware revision 0x15
    DMSC ABI revision 3.1
    
    INFO: Bootloader_runCpu:151: CPU r5f1-0  is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:151: CPU r5f1-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:151: CPU m4f0-0 is initialized to 400000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:214: CPU r5f0-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:214: CPU r5f0-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runSelfCpu:235: All done, reseting self ...
    
     
     0: Internal MAC loopback 
     1: External PHY loopback 
     
     Enter option: 0
    =============================
     Enet Loopback: Iteration 1 
    =============================
    CPSW_3G Test
    Enabling clocks!
    EnetAppUtils_reduceCoreMacAllocation: Reduced Mac Address Allocation for CoreId:1 From 4 To 2 
    Mdio_open:294 
    EnetUdma_openRxCh:2329 
    EnetHostPortDma_open:121 
    Cpsw_openInternal:936 
    Cpsw_closeInternal:1027 
    Assertion @ Line: 1027 in /work/bitbucket/keystone_rtos_sdk/dependencies/build/am64x/09_01_00/psdk_rtos_am64x-09_01_00/source/networking/enet/core/src/per/V1/cpsw.c: hCpsw->hRxRsvdFlow != NULL

    Thank you

  • Hi,

    I checked on my system as and the out-of-box example is working as expected.

     0: Internal MAC loopback 
     1: External PHY loopback 
     
     Enter option: 0
    =============================
     Enet Loopback: Iteration 1 
    =============================
    CPSW_3G Test
    Enabling clocks!
    EnetAppUtils_reduceCoreMacAllocation: Reduced Mac Address Allocation for CoreId:1 From 4 To 2 
    Mdio_open: MDIO Manual_Mode enabled
    PHY 0 is alive
    initQs() txFreePktInfoQ initialized with 16 pkts
    Received 5000 packets
    Delete EnetApp_rxTask() and exit..
    Transmitted 5000 packets 
    Delete EnetApp_txTask() and exit..
    
     Port 0 Statistics
    -----------------------------------------
      rxGoodFrames            = 5000
      rxBcastFrames           = 5000
      rxOctets                = 2590000
      txGoodFrames            = 5000
      txBcastFrames           = 5000
      txOctets                = 2590000
      octetsFrames512to1023   = 10000
      netOctets               = 5180000
      txPri[0]                = 5000
      txPriBcnt[0]            = 2590000

    Some information about my setup: I am using MCU+SDK 9.2 version, loading the .out file through CCS on R50-0 core of AM64x HS-FS EVM.

    Are you using the default installer or have you made any changes to that?

    Regards,

    Nitika