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: Enet CPSW LwIP, UDMA RX Channel open failed

Part Number: PROCESSOR-SDK-AM64X

Hi,

I am currently working with LWIP + CPSW on SK-AM64. Also an example exists in the SDK covering this topic: dev.ti.com/.../EXAMPLES_ENET_LWIP_CPSW.html

However, I always need to CPU power cycle if I want to relaod/rerun the program I am developing (also mentioned in the SDK) and disconnect and connect USB to be able to flash from CCS. This is a bit inconvenient...
If I do not follow these steps I get the following error:

EnetUdma_openRxCh: [Enet UDMA] UDMA RX Channel open failed: 0xffffffff
EnetHostPortDma_open: Failed to open Enet DMA RX channel: -1
Cpsw_openInternal: CPSW: Failed to open CPSW DMA
Assertion @ Line: 946 in /home/gtbldadm/nightlybuilds/repo_manifests/scripts/jenkins/mcu_plus_sdk_am64x_08_04_00_17/source/networking/enet/core/src/per/V1/cpsw.c: hCpsw->hRxRsvdFlow != NULL


Is there any possibility to overcome this issue?
My idea was to cleanly deinitialize UDMA ...

The application fails in Udma_chOpen() when trying to do Udma_chPair() (src/drivers/udma/udma_ch.c). In the generated drivers (ti_enet_open_close.c), which call these functions, I see that UDMA RX channels are initialized and opened with helper function EnetApp_openDmaChannels(). However, there is no such helper for closing DMA channels. I tried to add this functionality here, but working with this files is a bad idea as they are auto-generated and overwritten for each compilation.

Why is there no EnetApp_closeDmaChannels()? Could such a function cleanly shutting down DMA solve the issue? Or is there a completely other problem?

Do you have any solutions for that?

Kind Regards & Thank's
Dominik

  • Hi Dominik,

    Thanks for your query.

    ==> Assertion @ Line: 946 in /home/gtbldadm/nightlybuilds/repo_manifests/scripts/jenkins/mcu_plus_sdk_am64x_08_04_00_17/source/networking/enet/core/src/per/V1/cpsw.c: hCpsw->hRxRsvdFlow != NULL

    This error pointing that application is trying to find cpsw.c file from Jenkins location, which is a part of our nightly test infrastructure. Don't know why so Thinking

    Can you please provide SDK version you are working on ? looks like MCUSDK 8.4 ? can you please try same with latest release and update the results ?

    I will be on vacation tomorrow. So will be able to verify next week only.

    Best Regards

    Ashwani

  • Hi Ashwani,

    There is no search for a file on jenkins, you just see the path as I build the application with the prebuilt binaries (libraries) delivered from you (TI) in MCU+ SDK, I guess

    Yes, I am working on 8.4.0.17

    Unforntunately I cannot switch to latest 8.5 version as there are other issues for my board ... (e.g. https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1185565/processor-sdk-am64x-enet-layer-2-cpsw-example-does-not-work-anymore-with-sdk-version-08-05-00-24)

    Kind regards

    Dominik

  • Hi Dominik,

    Thanks for clarification.

    There is no search for a file on jenkins, you just see the path as I build the application with the prebuilt binaries (libraries) delivered from you (TI) in MCU+ SDK, I guess

    Can you please provide steps for me to reproduce the issue ?

    We are working on this issue.

    Best Regards

    Ashwani

  • Hi Ashwani,

    thank's for your time.

    You can simply reproduce the issue when executing the following example on a SK-AM64

    enet_lwip_cpsw_am64x-evm_r5fss0-0_freertos_ti-arm-clang (examples\networking\lwip\enet_lwip_cpsw\am64x-evm\r5fss0-0_freertos)
    SDK Version 8.4.0.17

    This is example is originally made for AM64x EVM, however by applying the following patch/git diff (just changing some ball-numbers) the application will work also on SK-AM64.

    diff --git a/examples/networking/lwip/enet_lwip_cpsw/am64x-evm/r5fss0-0_freertos/example.syscfg b/examples/networking/lwip/enet_lwip_cpsw/am64x-evm/r5fss0-0_freertos/example.syscfg
    index 7a818b9..1556a04 100644
    --- a/examples/networking/lwip/enet_lwip_cpsw/am64x-evm/r5fss0-0_freertos/example.syscfg
    +++ b/examples/networking/lwip/enet_lwip_cpsw/am64x-evm/r5fss0-0_freertos/example.syscfg
    @@ -33,6 +33,7 @@ const enet_cpsw1 = enet_cpsw.addInstance();
      * Write custom configuration values to the imported modules.
      */
     eeprom1.$name = "CONFIG_EEPROM0";
    +eeprom1.i2cAddress = 0x51;
     
     gpio1.$name                    = "CONFIG_GPIO0";
     gpio1.pinDir                   = "OUTPUT";
    @@ -117,12 +118,12 @@ enet_cpsw1.udmaDrv = udma1;
     debug_log.uartLog.UART.$suggestSolution             = "USART0";
     debug_log.uartLog.UART.RXD.$suggestSolution         = "ball.D15";
     debug_log.uartLog.UART.TXD.$suggestSolution         = "ball.C16";
    -enet_cpsw1.pinmux[0].RGMII1.RD0.$suggestSolution    = "ball.W5";
    -enet_cpsw1.pinmux[0].RGMII1.RD1.$suggestSolution    = "ball.Y5";
    -enet_cpsw1.pinmux[0].RGMII1.RD2.$suggestSolution    = "ball.V6";
    -enet_cpsw1.pinmux[0].RGMII1.RD3.$suggestSolution    = "ball.V5";
    -enet_cpsw1.pinmux[0].RGMII1.RX_CTL.$suggestSolution = "ball.W6";
    -enet_cpsw1.pinmux[0].RGMII1.RXC.$suggestSolution    = "ball.AA5";
    +enet_cpsw1.pinmux[0].RGMII1.RD0.$suggestSolution    = "ball.AA13";
    +enet_cpsw1.pinmux[0].RGMII1.RD1.$suggestSolution    = "ball.U12";
    +enet_cpsw1.pinmux[0].RGMII1.RD2.$suggestSolution    = "ball.Y13";
    +enet_cpsw1.pinmux[0].RGMII1.RD3.$suggestSolution    = "ball.V12";
    +enet_cpsw1.pinmux[0].RGMII1.RX_CTL.$suggestSolution = "ball.V13";
    +enet_cpsw1.pinmux[0].RGMII1.RXC.$suggestSolution    = "ball.W13";
     enet_cpsw1.pinmux[0].RGMII1.TD0.$suggestSolution    = "ball.V15";
     enet_cpsw1.pinmux[0].RGMII1.TD1.$suggestSolution    = "ball.V14";
     enet_cpsw1.pinmux[0].RGMII1.TD2.$suggestSolution    = "ball.W14";
    


    You will see that the application runs fine the first time executed. If you rerun the program without a power cycle you will get the error messages as explained.

    I also know that in the documentation the following hint is given "If you need to reload and run again, a CPU power-cycle is MUST". The question is more if there is a possibility to fix/adjust so that a rerun is possible.

    Kind regards

    Dominik

  • "If you need to reload and run again, a CPU power-cycle is MUST

    Hi Dominik,

    As mentioned, this is a known issue, tracking to fix in upcoming release. After fix, system reset will be enough for re-run the same code.

    Best Regards

    Ashwani

  • I wasn't aware that you regard this as a "bug" I thought that's just a hint.

    Okay I tried to fix by myself but failed, then I am looking forward to the fix