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.

TMDSCNCD263: Ethernet Ipv4 - frames are receiving but not able to transmit.

Part Number: TMDSCNCD263
Other Parts Discussed in Thread: AM2634

Hello Support Team,

I am working ethernet bootloader on AM2634 and tested MCAL demo App and communication was up and able to see ethernet frames on Wireshark.

I have configured my Eth & EthTrcv module same as MCAL demo app, except polling method instead of Interrupt.

*Identified an issue with Eth module initialization.

Eth initialization is as expected as compare to demo EthApp.

 

In EthTrcv initialization transceiver getting reset and re-initialized with EthTrcv_ConfigInit function.

Eth initialization is not changing same as previous value(Highlighted)

But the value is changed in my case as shown below

Not sure what is the problem here. is it cause for transmission issue?

*Still i can able to receive the Eth frames on reception end which are expected frames.

Only Eth frames and not transmitting out.

Could you please provide hints resolve this issue.

I'm stuck here from last week onwards, debugged a lot but not able to find root cause.

  • Hi Hari Krishna,

    The difference in register value which you mentioned above will impact speed and Duplex. Can you please provide the changes you did in configuration, and have you changed any thing in EthTrcv configuration?

    Additional information:

    If we wants to use Eth Driver in polling do the following changes in Ebtresos.

    Polling for Rx:  EthCtrlEnableRxInterrupt- disable and EthRxInterruptPacingEnabled -disable

    Polling for Tx: EthCtrlEnableTxInterrupt  -disable and EthTxInterruptPacingEnabled -disable

    EthUsrMdioInterruptEnable : This configuration parameter is required for only for MDIO operations( Not required for Rx/Tx only to read and write Transceiver registers : Eth_ReadMii and Eth_WriteMii). Here also supports both interrupt and polling mode.

    Thanks & Regards,

    Harish Nayineni

  • Hello Harish,

    I have attached Ebtresos config files, please let me know any wrong configurations.

    EthTrcv_DrvStatus still in UnInit state, but Eth frames are receiving.

    /* ======================================================================
     *   Copyright (C) 2022-2023 Texas Instruments Incorporated
     *
     *   All rights reserved. Property of Texas Instruments Incorporated.
     *   Restricted rights to use, duplicate or disclose this code are
     *   granted through contract.
     *
     *   The program may not be used without the written permission
     *   of Texas Instruments Incorporated or against the terms and conditions
     *   stipulated in the agreement under which this program has been
     *   supplied.
     * ==================================================================== */
    /**
     *  \file     EthTrcv_PBcfg.c
     *
     *  \brief    This file contains generated post build configuration file for
     *            Ethernet Transceiver MCAL driver
     *
     */
     
     /*******************************************************************************
        Project: Bootloader_Eth_Ipv4
        Date   : 2024-03-26 08:18:01
        This file is generated by EB Tresos
        Do not modify this file, otherwise the software may behave in unexpected way.
    
    *******************************************************************************/
    
    /* Module switch */
    #define ETHTRCV_PBCFG_SOURCE
    /*******************************************************************************
     * Standard Header Files
     ******************************************************************************/
    /*******************************************************************************
     * Other Header Files
     ******************************************************************************/
    #include "EthTrcv.h"
    
    /*******************************************************************************
     *  Version Check
     ******************************************************************************/
    /*  Version checking  */
     #if ((ETHTRCV_SW_MAJOR_VERSION != (9U))||(ETHTRCV_SW_MINOR_VERSION != (0U)))
      #error "Version numbers of EthTrcv_PBcfg.c and EthTrcv.h are inconsistent!"
    #endif
    #if ((ETHTRCV_CFG_MAJOR_VERSION != (9U)) || (ETHTRCV_CFG_MINOR_VERSION != (0U)))
      #error "Version numbers of EthTrcv_PBcfg.c and EthTrcv_Cfg.h are inconsistent!"
    #endif
    /*******************************************************************************
     * Local Preprocessor #define Constants
     ******************************************************************************/
    /*******************************************************************************
     * Local Preprocessor #define Macros
     ******************************************************************************/
    /*******************************************************************************
     * Local Data Types and Structures
     ******************************************************************************/
    /*******************************************************************************
     * Constants for Post-Build Configuration
     ******************************************************************************/
    #define ETHTRCV_START_SEC_CONFIG_DATA
    #include "EthTrcv_MemMap.h"
    
    /*<ETHTRCV_CONFIG>*/
    VAR(struct EthTrcv_ConfigType_s, ETHTRCV_PBCFG)
        EthTrcvConfigSet_EthTrcvConfig_0 =
    {
        .ctrlIdx = 0U,
        .trcvIdx = 0U,
        .phyAddr = 0U,
        .MiiSel = RGMII,
        .enableAutoNeg = (uint32 ) TRUE,
        .connNeg = TRCV_CONN_NEG_AUTO,
        .advertiseCapab =
            (0U
            |ETHERNET_ADV_CAPAB_10_HALF
            |ETHERNET_ADV_CAPAB_10_FULL
            |ETHERNET_ADV_CAPAB_100_HALF
            |ETHERNET_ADV_CAPAB_100_FULL
            |ETHERNET_ADV_CAPAB_1000_FULL
            ),
        .linkPartCapab =
            (0U
            ),
        .isGigCapab =  (uint32 )TRUE,
        .baudRate = (ETHTRCV_BAUD_RATE_100MBIT),
        .duplexMode = ETHTRCV_DUPLEX_MODE_FULL,
        .loopbackEnable = (boolean)FALSE,
        .PortMacLaySpeed = ETH_MAC_LAYER_SPEED_100M,
        .PortMacLaySubType = REDUCED,
        .PortMacLayType = TRCV_MAC_LAYER_TYPE_XMII,
        .PhysLayerType = TRCV_PHYS_LAYER_TYPE_100BASE_T1
    };
    
    VAR(struct EthTrcv_ConfigType_s, ETHTRCV_PBCFG)
        EthTrcvConfigSet_EthTrcvConfig_1 =
    {
        .ctrlIdx = 0U,
        .trcvIdx = 1U,
        .phyAddr = 3U,
        .MiiSel = RGMII,
        .enableAutoNeg = (uint32 ) TRUE,
        .connNeg = TRCV_CONN_NEG_AUTO,
        .advertiseCapab =
            (0U
            |ETHERNET_ADV_CAPAB_10_HALF
            |ETHERNET_ADV_CAPAB_10_FULL
            |ETHERNET_ADV_CAPAB_100_HALF
            |ETHERNET_ADV_CAPAB_100_FULL
            |ETHERNET_ADV_CAPAB_1000_FULL
            ),
        .linkPartCapab =
            (0U
            ),
        .isGigCapab =  (uint32 )TRUE,
        .baudRate = (ETHTRCV_BAUD_RATE_100MBIT),
        .duplexMode = ETHTRCV_DUPLEX_MODE_FULL,
        .loopbackEnable = (boolean)FALSE,
        .PortMacLaySpeed = ETH_MAC_LAYER_SPEED_100M,
        .PortMacLaySubType = REDUCED,
        .PortMacLayType = TRCV_MAC_LAYER_TYPE_XMII,
        .PhysLayerType = TRCV_PHYS_LAYER_TYPE_100BASE_T1
    };
    
    
    /*</ETHTRCV_CONFIG>*/
    #define ETHTRCV_STOP_SEC_CONFIG_DATA
    #include "EthTrcv_MemMap.h"
    /*******************************************************************************
     *  End of File: EthTrcv_PBcfg.c
     ******************************************************************************/
    
         
    /* ======================================================================
     *   Copyright (c) 2022-2023 Texas Instruments Incorporated
     *
     *   All rights reserved. Property of Texas Instruments Incorporated.
     *   Restricted rights to use, duplicate or disclose this code are
     *   granted through contract.
     *
     *   The program may not be used without the written permission
     *   of Texas Instruments Incorporated or against the terms and conditions
     *   stipulated in the agreement under which this program has been
     *   supplied.
     * ==================================================================== */
    
     /**
     *  \file     Eth_PBCfg.c
     *
     *  \brief    This file contains generated post build configuration file
     *            for ETH MCAL driver
     */
    
    /*******************************************************************************
        Project: Bootloader_Eth_Ipv4
        Date   : 2024-03-26 08:18:01
        This file is generated by EB Tresos
        Do not modify this file, otherwise the software may behave in unexpected way
    *******************************************************************************/
    
    /*******************************************************************************
     * Standard Header Files
     ******************************************************************************/
    
    /*******************************************************************************
     * Other Header Files
     ******************************************************************************/
    #include "Eth.h"
    
    /*******************************************************************************
     *  Version Check
     ******************************************************************************/
    
    /*  Version checking  */
     #if ((ETH_SW_MAJOR_VERSION != (9U))||(ETH_SW_MINOR_VERSION != (0U)))
      #error "Version numbers of Eth_PBcfg.c and Eth.h are inconsistent!"
    #endif
    
    #if ((ETH_CFG_MAJOR_VERSION != (9U)) || (ETH_CFG_MINOR_VERSION != (0U)))
      #error "Version numbers of Eth_PBcfg.c and Eth_Cfg.h are inconsistent!"
    #endif
    
    /*******************************************************************************
     * Constants for Post-Build Configuration
     ******************************************************************************/
    #define  ETH_START_SEC_CONFIG_DATA
    #include "Eth_MemMap.h"
    
    #ifdef __cplusplus
    extern "C" {
    #endif
    
    
    extern void EcuM_cacheWbInv(uint8 *BufPtr, uint32 LenByte);
    extern void EcuM_cacheInvalidate(uint8 *BufPtr, uint32 LenByte);
    
    /* generation of runtime configuration       */
    /*<ETH_CONFIG>*/
    VAR(struct Eth_ConfigType_s, ETH_PBCFG)
        EthConfigSet_EcuTestNode =
    {
           .ctrlIdx = 0U,
    	   .portIdx = ETH_PORT1,
           .portCfg =
           {
                .macCfg =
                {
                    .macModeFlags = (0U  ),
                    .macConnectionType = (Eth_MacConnectionType)ETH_MAC_CONN_TYPE_RGMII_DETECT_INBAND,
                    .macAddr =
                    {
                        0x33U,
                        0x33U,
                        0x00U,
                        0x00U,
                        0x00U,
                        0x01U,
                    },
                },
           },
    
    #if (ETH_ENABLE_MII_API != STD_ON)
        #error "Mistmatch between Precompile header and Post Build configuration"
    #endif
           .mdioCfg =
           {
               .mdioBusFreq = (uint32)2200000U,
               .mdioClockFreq = (uint32) 200000000U
           },
    
           .cpdmaCfg =
           {
                .pacingClkFreq = (uint32)125000000U,
                .rxInterruptPacingEnabled = (uint32) FALSE,
                .rxInterruptsPerMsec = 2U,
                .txInterruptPacingEnabled = (uint32) FALSE,
                .txInterruptsPerMsec = 2U,
                .dmaModeFlags = 0U,
                .rxThreshCount = 15U,
           },
    #if (ETH_GLOBALTIMESUPPORT_API == STD_ON)
           .cptsCfg =
           {
               .cptsInputFreq = 100U,
               .vlanType      = ETH_CPTS_VLAN_TYPE_NONE,
               .msgTypeCfg    = (0U
                                )
           },
    #endif
    
           .enableCacheOps = (uint32)TRUE,
    	   
           .cacheFlushOps = (Eth_CacheFlushType)EcuM_cacheWbInv,
    
           .cacheInvalidateOps = (Eth_CacheInvalidateType)EcuM_cacheInvalidate,
           /* Fifo configuration not used, added for QoS implementation in Future */ 
            .egressFifo =
            {
            [0] =
                {
                .egressBufLenByte = 1522U,
                .egressBufTotal = 2U,
                .egressFifoIdx = 0U,
                .egressFifoPriority = 0U
                },
            },
    
           .ingressFifo =
            {
            [0] =
                {
                .ingressBufLenByte = 1522U,
                .ingressBufTotal = 2U,
                .ingressFifoIdx = 0U,
                .ingressFifoPriority = 0U
                },
            }
    };
    /*</ETH_CONFIG>*/
    
    #ifdef __cplusplus
    }
    #endif
    #define  ETH_STOP_SEC_CONFIG_DATA
    #include "Eth_MemMap.h"
    
    /*******************************************************************************
     *  End of File: Eth_PBcfg.c
     ******************************************************************************/
    

    EthTrcv_Cfg.h        Eth_Cfg.h

  • HI Hari,

    I will check your config files and get back to you incase something is missing

    Regards,

    Shaunak

  • Hi Hari,

    Can we please schedule a call to debug this further. With sufficient information available, we might be able to debug further. It is a bit difficult to understand what might be going wrong.

    Regards

    Shaunak

  • Hi Shaunak,

    Sure, i like to have a debug to solve issue quickly.

    I have some findings, and checking it.

    Seems, some timing issue i EthTrcv initialization.

    EthApp from mcal.

    Q) in which mode timer RTI0C0 is used for delay generation during EthTrcv initialization?

    In general Elektrobit uses capture & compare mode for OS timer/counter.

    Kind regards,

    Hari

  • Hi Hari,

    I have some findings, and checking it.

    Great, can you please let me know what it is?

    Also, can you suggest a time next week for the debug call (over email).

    Regards,

    Shaunak

  • Hi Shaunak,

    I have attached zip file with required files, Harish requested during our debug session.

    TI_Support.zip

    Let me know any additional files required.

    Kind regards,

    Hari

  • Hi Hari,

    Thanks for sharing the files. Please allow some time for us to review and get back.

    Regards,

    Shaunak

  • Hi Shaunak & Harish,
    Could you please explain the images below.
    I have configured Port1 only & there are some STATS in Port0 & Port2 as well.
    Addresses in AM263_cpsw_stats_print_regs.gel , not found in Datasheet & Register manual.
     MCAL Demo:
    My Application:
    Kind regards,
    Hari
  • Hi Hari, 

    In MCAL demo as well PORT 2 not using, STATS wrt PORT2 showing in MCAL Demo due to bug/issue in Gel file. As per Am263 Register Addendum TX_PRI_REG and TX_PRI_BCNT_REG are common registers with priority 0-7, but in AM263_cpsw_stats_print_regs.gel file mapped to port number as well. In your Application after successful transmit you can also see these Stats.

    I tried to debug with you files shared, But iam getting some build issues in MCU module configuration. Without your MCU configuration Transmit functionality working as expected. i will try to fix the build issue in MCU configuration and update you the status.

    Thanks & Regards,

    Harish Nayineni

  • Hi Harish,

    In the images above, TX & RX frames are showing in PORT1 for MCAL demo, but in my case TX frames are showing in PORT0 & RX frames in PORT1.

    I have checked gel files, PORT0 & PORT1 address are different.

    What could be the reason TX frames showing in PORT0 in my application, even i have configured PORT1 only.

    Kind regards,

    Hari

  • Hi Hari,

    Port 0 is Host port, Port1 and 2 are external Ports. Tx frames are not routing to external Ports. this can be happen if Mac address not updates in ALE table. But in your case it is updating in ALE table and we tried in debug call with Broadcast address(which will be updated in ALE table during init) as well. 

    Thanks & Regards,

    Harish Nayineni

  • Hi Harish,

    Could you please let me know is there any update regarding the issue.

    Kind regards,

    Hari

  • Hi Hari,

    As per the last update, I see that the configurations were working fine without the MCU changes. I tried to replicate and ran into a lot of MCU related build errors.

    Please allow me some time to review the same and fix and test again,

    Regards,

    Shaunak

  • Hi Hari,

    Apologies for late response and thanks for waiting patiently.

    I reviewed and I used your configuration files shared in the Zip file above. I enabled Tx polling instead of interrupt in the Eth_App demo.

    I see the Tx working. I verified by sending 50,000 packets from the Microcontroller. I will attach my wireshark snippet and all the configuration files I used.

    Please note that you might find some differences in my config files. The changes were done in order to resolve build errors.I am also attaching my Eth_App demo files.

    Wireshark snippet: (IPV4 frames from MCU (MAC addr: 00:01:02:03:04:05) sent out as broadcast frames (MAC addr: FF:FF:FF:FF:FF:FF)

    Console output:

    Zip of config and demo files:

    EB_debug.zip

    Regards,

    Shaunak

  • Hi Shaunak,

    Thank you for your support & the files.

    I have compared the files, there are changes in MCU & Port config.

    I will test it locally, If possible could you please share .xdm files, so i can adapt my configuration in EB tresos.

    Kind regards,

    Hari

  • Hi Hari, 

    I actually did not make the changes using EB tresos. I took your config files directly and replaced them in the path: mcal\examples_config\module_demo_cfg\soc\am263\r5f0_0 .

    Here I replaced the cfg.c and cfg.h files, then based on the build errors I changed the configuration and fixed the build. Then tested.

    Regards,

    Shaunak

  • From the CPSW stats, one unicast packet sent by Eth driver ingressed through Host port (Port 0) but was dropped (STATS_0_PORTMASK_DROP=1). This happened because it was an unknown unicast packet (STATS_0_ALE_UNKN_UNI=1), that is, packet's DA was not in the ALE table.

    For the packet not to be dropped:

    • DA should be in the ALE table and be associated with MAC port 1 (or 2). You get this either by ALE learning this address from a packet previously received on that port or by explicitly adding an unicast entry to the table. I believe the driver will not explicitly add this unicast entry.
    • ALE is configured to forward unknown unicast packets.
    • Packet is sent as a directed packet. This is not the case in Eth driver.

    My suggestion is to have the external device sent packets to your application, and then have your app send packets and see if the drops persist.

  • Hello,

    Ethernet Tx and Rx is working, but Tcp& Icmp frame is getting dropped.

    Difference in working & non working is 

    11-22-33-44-55-66 is not working, not sure why because it is configurable parameter, can be set any value..

    Do you have any idea about dependency of this parameter?

    You can close this ticket, as i have created another ticket for Frame drop issue.

    Kind regards,

    Hari

  • 11-22-33-44-55-66 is not working, not sure why because it is configurable parameter, can be set any value..

    11-22-33-44-55-66 is a multicast address. It cannot be the controller's MAC address.

  • But it is recommended config parameter from TI MCAL.

    I kept recommended configuration for Eth & EthTrcv from MCAL.

  • That param value was incorrect and has been fixed in all relevant recommended configuration files.

  • Hi  Misael Lopez Cruz,

    Could you please let me know, from which version of MCAL that parameter got fixed.

    Kind regards,

    Hari 

  • It was fixed in SDK 9.1.

  • MCAL version please, as we use MCAL in our Integration. 

  • MCAL version: MCAL_AM263x_09.01.00