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.

AM2434: How to implement HUB functionlity without UDMA ?

Part Number: AM2434


Hello,

I am encountering an issue while attempting to open the CPSW device as a HUB. In the SDK the cpsw.c file within the Cpsw_openInternal function, it seems that a UDMA connection is required. I am seeking assistance on how to work around this requirement.

For context, I have referred to the discussion thread titled "AM2434 - Only ARP Broadcast Packets Forwarding" on the TI E2E Support Forums (link: https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1247183/am2434-only-arp-broadcast-packets-forwarding).

In my inquiry within the thread, I asked whether it is necessary to implement the UDMA connection to achieve the desired functionality of configuring the CPSW as a hub-like device. Venkata Susheel Voora responded, stating that the UDMA path is only required for the packets to be received by the R5 core, and the switch functionality is performed solely by the CPSW hardware.

I am providing the debug output for further clarification: "Mdio_open: MDIO Manual_Mode enabled Cpsw_openInternal: CPSW: DMA open config is NULL Cpsw_closeInternal: Assertion @ Line: 1026 in C:/ti/mcu_plus_sdk_am243x_08_06_00_43/source/networking/enet/core/src/per/V1/cpsw.c: hCpsw->hRxRsvdFlow != NULL"

I would greatly appreciate any guidance or insights on how to bypass the UDMA connection requirement in this context.

Thank you for your support.

  • Hi Christian,

    Our ethernet (CPSW) expert is OOO. Please expect some delay in response. Thanks for your patience

  • In my inquiry within the thread, I asked whether it is necessary to implement the UDMA connection to achieve the desired functionality of configuring the CPSW as a hub-like device. Venkata Susheel Voora responded, stating that the UDMA path is only required for the packets to be received by the R5 core, and the switch functionality is performed solely by the CPSW hardware.

    Hi Christian,

    The switching functionality i.e forwarding packets from port to port happens independent of R5F core(thus no need of UDMA).

    When CPU(r5f) needs to consume the packets coming in through CPSW, UDMA is used to fetch the packets from CPSW HW fifo to R5F memory, thus you will have to use UDMA. This seems to be your current requirement. So you cannot avoid using UDMA.

    I am providing the debug output for further clarification: "Mdio_open: MDIO Manual_Mode enabled Cpsw_openInternal: CPSW: DMA open config is NULL Cpsw_closeInternal: Assertion @ Line: 1026 in C:/ti/mcu_plus_sdk_am243x_08_06_00_43/source/networking/enet/core/src/per/V1/cpsw.c: hCpsw->hRxRsvdFlow != NULL"

    Is this issue seen with the SDK example or have you made changes to DMA configurations?

  • Hi Nilabh Anand

    The data packets from the CPSW are not needed, as we are exclusively using the CPSW as a hub. We do not want to use DMA.

    When CPU(r5f) needs to consume the packets coming in through CPSW, UDMA is used to fetch the packets from CPSW HW fifo to R5F memory, thus you will have to use UDMA. This seems to be your current requirement. So you cannot avoid using UDMA.

    In the SDK file mcu_plus_sdk_am243x_08_06_00_43/source/networking/enet/core/src/per/V1/cpsw.c, specifically in the function Cpsw_openInternal at line 926, it's important to note that a DMA configuration is required. Here's the relevant code snippet:

    /* Open DMA */
    if (status == ENET_SOK)
    {
        if (NULL != cfg->dmaCfg)
        {
            /* Open UDMA for CPSW NAVSS instance type */
            hCpsw->hDma = EnetHostPortDma_open(hPer, cfg->dmaCfg, &cfg->resCfg);
            if (NULL == hCpsw->hDma)
            {
                ENETTRACE_ERR("CPSW: Failed to open CPSW DMA\r\n");
                status = ENET_EFAIL;
            }
        }
        else
        {
            ENETTRACE_ERR("CPSW: DMA open config is NULL\r\n");
            status = ENET_EINVALIDPARAMS;
        }
    }

    This code block highlights the necessity of having a DMA configuration in place to open the DMA successfully. If cfg->dmaCfg is set to NULL, it will result in an error with the message "CPSW: DMA open config is NULL" and a status of ENET_EINVALIDPARAMS. Therefore, ensure that a valid DMA configuration is provided to enable proper DMA functionality in this context.

    Thank you for your support.

  • This code block highlights the necessity of having a DMA configuration in place to open the DMA successfully. If cfg->dmaCfg is set to NULL, it will result in an error with the message "CPSW: DMA open config is NULL" and a status of ENET_EINVALIDPARAMS. Therefore, ensure that a valid DMA configuration is provided to enable proper DMA functionality in this context.

    Yes thats correct Christian, Let me know if you have any other query.

  • The data packets from the CPSW are not needed, as we are exclusively using the CPSW as a hub. We do not want to use DMA.

    What do I need to do to operate the CPSW without DMA?

  • What do I need to do to operate the CPSW without DMA?

    It is not possible to use CPSW without using UDMA, as it is the only interface through which cpu can access the packets.