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.

CCS/TDA3XEVM: CCS 8.3.1/8.3.1, I have 15x15 TDA3xEVM

Part Number: TDA3XEVM

Tool/software: Code Composer Studio

I want to run GMAC_SW on TDA3xx.
I have CCS 8.3.1, I have 15x15 TDA3xEVM board and PROCESSOR_SDK_VISION_03_07_00_00

I am trying to run a test case internal_loopback_tda3xx_ipu1 from
c: \ PROCESSOR_SDK_VISION_03_07_00_00 \ ti_components \ networking \ nsp_gmacsw_4_16_01_01 \ packages \ ti \ ndk \ tda3xx \ examples_ipu1 \ internal_loopback \

I changed the GMACSW_Config * GMACSW_getConfig (void) function from the tda3xx_init.c file as follows:

GMACSW_Config *GMACSW_getConfig(void)
{
int i = 0;
uint8_t macAddr[6];

/* Get digital loopback starting config */
GMACSW_Config *pGMACSWConfig = GMACSW_CONFIG_getDLBConfig();

/* Set count of active MAC ports */
pGMACSWConfig->activeMACPortMask = PORT_MASK_MAC_BOTH;

/* Update default config with the correct MAC addresses */
for(i=0; i<MAC_NUM_PORTS; i++)
{
if ( (1U << i) & pGMACSWConfig->activeMACPortMask )
{
if (0==i)
{
/* Get the MAC Address from control module register space */
macAddr[5] = 0x12;
macAddr[4] = 0x12;
macAddr[3] = 0x12;

macAddr[2] = 0x12;
macAddr[1] = 0x12;
macAddr[0] = 0x12;
}
else
{
/* Get the MAC Address from control module register space */
macAddr[5] = 0x14;
macAddr[4] = 0x14;
macAddr[3] = 0x14;

macAddr[2] = 0x14;
macAddr[1] = 0x14;
macAddr[0] = 0x14;
}

printf("\nMAC Port %d Address:\n\t%02x-%02x-%02x-%02x-%02x-%02x\n", i,
macAddr[0], macAddr[1], macAddr[2],
macAddr[3], macAddr[4], macAddr[5]);

/* Copy the correct MAC address into the driver config */
memcpy( (void *)&(pGMACSWConfig->macInitCfg[i].macAddr[0]), (void *)&macAddr[0], 6 );

/*
* Adjust the PHY mask numbers for the Vayu EVM. The first MAC
* port is connected to a PHY with address = 2, the second MAC
* port is connected to a PHY with address = 3.
*/
pGMACSWConfig->macInitCfg[i].phyMask = 0x1 << i;
}
}

/* Return the config */
return pGMACSWConfig;
}


I got the following program log

[Cortex_M4_IPU1_C0]
MAC Port 0 Address:
12-12-12-12-12-12

MAC Port 1 Address:
14-14-14-14-14-14
GMACSW has been started successfully
Registration of the GMACSW Successful
Network Added: If-1: 192.168.1.200
Begin transmit task.
Begin receive task.
Packet 0: Raw socket send failed with some error.
EMSGSIZE: The size of the data being sent exceeds the MTU of the interface.internal_loopback.zip

What needs to be done for the test application to run?

  • Hi,

    Can you try the default application without the changes ? What do you see ?

    Regards

    Vineet

  • Hi, Vineet

    If you start the project without changes, then GMAC_SW is not initialized, the project does not start, the log will be as follows:

    [Cortex_M4_IPU1_C0]
    MAC Port 0 Address:
    00-00-00-00-00-00

    MAC Port 1 Address:
    00-00-00-00-00-00
    GMACSW_open() Returned error
    Error: Unable to register the GMACSW
    Begin transmit task.
    Error in setsockopt() API.
    Error: Incorrect device index specified

  • Hi
    Will the answer be on my question?
  • Hi, I was able to run the internal_loopbak project
    with the following changes

    1) In the ndk2nsp.h file, changed the number of buffers for receiving and transmitting.

    / *
    #define NDK2NSP_RX_PACKETS (128U)
    #define NDK2NSP_TX_PACKETS (64U)
    * /
    #define NDK2NSP_RX_PACKETS (8U)
    #define NDK2NSP_TX_PACKETS (4U)

    and rebuilt the driver

    2) In the tda3xx_init.c file, I changed the GMACSW_Config * GMACSW_getConfig (void) function to set valid MAC addresses
    3) In the raw_eternet_test.c file, added log output and reduced the packet length.

    After that I got the following program log:

    [Cortex_M4_IPU1_C0]
    MAC Port 0 Address:
    00-0e-99-04-0d-04

    MAC Port 1 Address:
    14-14-14-14-14-14
    GMACSW has been started successfully
    Registration of the GMACSW Successful
    Network Added: If-1: 192.168.1.200
    Begin transmit task.
    Begin receive task.
    Packet 0: Raw socket send success.

    From the log you can see that the transmission was successful, but the reception is not working.

    In this regard, the question is - what needs to be done to make the test application work correctly?

    All my changes are attached2.zip

  • Hi Sergey,

    Can you please let me know reason for running specifically the loopback example? Even though it should work without any issues, we use client example for SDK checkout and loopback example is not tested.

    Can you please run client example which has been validated with this version of vision SDK.

    Regards.

    Prasad