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.

TMS320C6678: Problems example NIMU_EmacClientExample on TMDSEVM6678 Eval board

Part Number: TMS320C6678

I'm trying to run the network client example provided with processor_sdk_rtos_c667x_6_03_00_106.

The example in FLASH runs on power-up and operates correctly, so there's no problem withh the hardare.

I am using Code Composer Studio 9.3.0

I was able to go through creating and importing and compiling and loading the example program.

I can run the program, set breakpoints, and step through the code.

The program starts but is unable to initialize DHCP because the network interface is not configured.

I was able to enable the NIMU debugging to the point that I got the following information:

[C66xx_0] QMSS successfully initialized
CPPI successfully initialized
PA successfully initialized

TCP/IP Stack Example Client
Configuring DHCP client
EmacInit
EmacInit_Core
nimu_get_emac_info called
PASS successfully initialized
Ethernet subsystem successfully initialized
Timeout waiting for reply from PA to Pa_addMac command
Add_MACAddress failed
Error: Unable to register the EMAC
00000.000 DHCPOpen: NIMUIOCTL (NIMU_GET_DEVICE_MAC) Failed with error code: -22

Service Status: DHCPC    : Failed   :          : 000
Service Status: Telnet   : Enabled  :          : 000
Service Status: HTTP     : Enabled  :          : 000

The problem seems to be in adding the mac address to the packet accellerator subsystem.  Any idea how I would begin to sort out that problem?

Thanks in Advance

Cary

  • Hi Cary,

    I observed,

    Timeout waiting for reply from PA to Pa_addMac command

    Here you were modifying the MAC address for the EVM and here you were trying to get the MAC address using NIMU API.

    00000.000 DHCPOpen: NIMUIOCTL (NIMU_GET_DEVICE_MAC) Failed with error code: -22

    Here you were trying to get the MAC address usng NDK API. But, it fails and subsequently DHCP also fails since MAC address is not available. 

    Could you please try to get the MAC address without setting them n the code and provide your observation.

    Thanks,

    Rajarajan U

  • I'm not setting the MAC address in my code.  The code in nimu_eth.c sets it up.

    The problem occurs during initialization of the Emac device.

    The call path is

    NIMUInit -> EmacInit -> EMAC_Init_Core -> NIMURegister -> EmacStart

    The EmacStart function fails when it tries to set up the mac address
    in the PA Lookup table:

        /* Set up the MAC Address LUT*/
        if (Add_MACAddress (&ethInfo, &routeInfo) != 0)
        {
            NIMU_drv_log ("Add_MACAddress failed \n");
            return -1;
        }


    Since this fails NIMURegister returns before linking the Emac
    device into nimu_mcb.devices.  Then when the DHCP service tries
    to configure, it can't find an ethernet device so it can't get an IP address.

    Looking in Add_MACAddress (in nimu_eth.c) in more detail...
    It seems to call Pa_addMac(), and then waits for a response from
    a qmss queue.  It's not clear if Pa_addMac() actually manipulates
    PA (Packet accellerator) registers, or sets up a command for the
    PA_LLD firmware to execute.  This step is a bit murky.

    Any advice on trying to figure out why this is not working?

    Thanks,

    Cary

  • Hi Cary,

    I apologise for the delay from my side. It seems to be old version of NIMU is used. I do have the same verison of SDK and CCS. but, mine uses NIMU V7 ("C:\ti\pdk_c667x_2_0_16\packages\ti\transport\ndk\nimu\src\v7") which uses "NimuStart" instaed of "EmacStart". Could please try with the latest version of SDK. 

    If you still face this issue, Kindly DM me.

    Thanks,

    Rajarajan U

  • This did not resolve the issue (I clicked the wrong button).

    here is the output of running the nimu_emacsClientExample with debug printing enabled:

    'C66xx_0] QMSS successfully initialized
    CPPI successfully initialized
    PA successfully initialized (Version PA LLD Revision: 03.00.02.08:May 3 2022:11:03:44)

    TCP/IP Stack Example Client
    Configuring DHCP client
    EmacInit
    EmacInit_Core
    nimu_get_emac_info called
    PASS successfully initialized
    Ethernet subsystem successfully initialized
    Timeout waiting for reply from PA to Pa_addMac command
    Add_MACAddress failed
    Error: Unable to register the EMAC
    00000.000 DHCPOpen: NIMUIOCTL (NIMU_GET_DEVICE_MAC) Failed with error code: -22

    Service Status: DHCPC : Failed : : 000
    Service Status: Telnet : Enabled : : 000
    Service Status: HTTP : Enabled : : 000

    I believe the analysis of the code flow in an earlier post applies to this run also

  • Hi Cary,

    The reason for Pa_addMac failure is mentioned in this post 

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/186788/add_macaddress-failed

    Thanks,

    Rajarajan U