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.

[FAQ] TDA4VM: How do I run MCU CPSW2G Enet examples on Main Domain R5F cores?

Part Number: TDA4VM
Other Parts Discussed in Thread: TDA4VH

Tool/software:

How to run MCU CPSW2G ENET examples on Main domain R5F cores like MCU2_0 or MCU2_1?

  • By default TI SDK enables MCU CPSW2G ENET examples on MCU R5F core like  MCU1_0.

    To run MCU CPSW2G ENET examples on Main Domain R5F cores (MCU2_0, MCU2_1 or others), follow these steps to modify the example application.

    1) Enable MCU CPSW2G Instance in EnetType Configuration.

    Modify the configuration to enable MCU CPSW2G for the desired core.

    File path:
    pdk/packages/ti/drv/enet/examples/enet_xxx_example/test_config_j7x.c

    Note:
    If using TDA4VH, the platform has two instances of CPSW2G.
    Instance ID :  0 refers to MCU CPSW2G
    Instance ID :  1 refers to Main CPSW2G.

    Ensure you set InstID as 0 to the target core with CPSW2G instance type.

    2) Enable default Resources for the Target core.

    Adjust the resource configuration for the core where you intend to run the example.

    File path:
    pdk/packages/ti/drv/enet/examples/utils/Vx/enet_apprmcfg.c

    Example:
    To enable the MCU2_1 core for the MCU_CPSW2G examples, configure as shown in below:

    static EnetRm_ResPrms gEnetAppRmDefCfg_2G =
    {
        .coreDmaResInfo =
        {
            [0] =
            {
                .coreId        = IPC_MPU1_0,
                .numTxCh       = 2U,
                .numRxFlows    = 2U,
                .numMacAddress = 1U,
            },
            [1] =
            {
                .coreId        = IPC_MCU1_0,
                .numTxCh       = 4U,
                .numRxFlows    = 4U,
                .numMacAddress = 1U,
            },
            [2] =
            {
                .coreId        = IPC_MCU2_1,
                .numTxCh       = 2U,
                .numRxFlows    = 2U,
                .numMacAddress = 1U,
            },
        },
        .numCores = 3,
    };


    Make sure you configure coreId, .numTxCh, /numRxFlows and .numMacAddress based on intended core.

    3) Update CPSW2G Interrupt Numbers

    Update the CPSW2G Interupt nnumbers for the target core. By default, the SDK maps interrupt numbers of the Main Domain CPSW for the below SoCs.

    File path:
    pdk/packages/ti/drv/enet/soc/j7x/j7xxxx/enet_soc.c

    Apply/integrate the appropriate patch for your SoC.

    For J7200: 
    J7200.patch

    For J784s4:
    J784s4.patch

    For J742s2:
    J742s2.patch

    Ensure the interrupt configuration is correctly set for the desired core.

    By following above steps, you can run MCU CPSW2G ENET examples in Main Domain R5F cores like MCU2_0 or MCU2_1.