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.

TMS320C6672: NDK Stack starts, but network is not added on custom board

Part Number: TMS320C6672

Hi,

This question might be too specific, but I'll try my chances in case someone has encountered a similar issue.

We have two custom boards featuring C6672 DSP. On the first board, the Ethernet interface seems to be working fine as I'm able to ping it from a PC. However, on the second board (which is supposed to be identical to the first one), I can't get Ethernet working. After some software debugging, I get:

  • The NDK Stack thread is successfully started.
    I can see this as my IP Stack Begin Hook function is called (as well as from the ROV window).
  • Everything seems normal until the line where NC_Start function is called.
  • Once the processor has entered NC_Start, it never exits it, and I can't debug what's happening inside (at which point it could be stuck in a loop, etc.).

Since I load the same OUT file built from the same CCS project via the same emulator (XDSv560), I suppose I could rule out the possibility of a software-related problem, right? If so, what would you recommend to resolve the issue on hardware level? Or could it still be software-related?

Thanks in advance.

  • Hi,

    Both boards are the same hw, right? Or there are some hw differences?

    Is it possible to test your code on a reference design (TMDS6678) and see if it works? Also have you tried adding breakpoints in CCS and going through the code using "Step into" function in CCS? 

    Best Regards,
    Yordan

  • Hi Yordan,

    Both boards should be identical, but the fact that the same executable runs differently on them makes me think of the possibility of some kind of production error.

    Unfortunately, we don't have any reference designs.

    Yes, I've been working with breakpoints in CCS; that's how I deduced the function "NC_Start" is never exited.

    Regards,
    Silacko

  • Hi,

    From the NDK 

    /*!
    * @brief Start network
    *
    * This function is called to boot up the network using the network
    * configuration supplied in @c hCfg. Along with the network
    * configuration, three callback function pointers are
    * provided. These callback functions are called at distinct
    * times.
    * * @c NetStartCb is called when the system is first ready for
    * the creation of application supplied network tasks.
    * * @c NetStopCb is called when the network is about to shut down.
    * * @c NetIPCb is called when an IP address is added or removed
    * from the system.
    *
    * If any of these callback functions are not required, the function
    * pointers can be set to NULL.
    *
    * @param[in] hCfg Handle to network configuration
    * @param[in] NetStartCb Optional pointer to callback function called when
    * network stack is started
    * @param[in] NetStopCb Optional pointer to callback function called when
    * network is stopped
    * @param[in] NetIPCb Optional pointer to callback function called when
    * an IP address is added or removed from the
    * system
    *
    * @remark @c NC_NetStart() will not return until the entire network
    * session has completed. Thus, all user supplied network
    * code (creation of user tasks) should be included in
    * the @c NetStartCb function.
    *
    * @remark When @c NetStartCb is called, the configuration handle
    * supplied in @c hCfg is the default configuration
    * handle for the system. The execution thread on which
    * @c NetStartCb is called is not critical to event
    * scheduling, but it should return eventually; i.e., the
    * application should not take control of the thread. If
    * system shutdown is initiated before this callback
    * function returns, some resources may not be freed.
    *
    * @remark Excluding critical errors, NC_NetStart() will return only
    * if an application calls the NC_NetStop() function. The
    * parameter passed to NC_NetStop() becomes the return
    * value returned by NC_NetStart().
    *
    * @remark Sometime after NC_NetStop() is called, but before
    * NC_NetStart() returns, the NC_NetStart() thread will
    * make a call to the application's NetStopCb callback
    * function. In this callback function, the application
    * should shut down any task initiated in its
    * @c NetStartCb callback.
    *
    * @remark When an IP addressing change is made to the system, the
    * @c NetIPCb function is called. The callback function is
    * declared as:
    * @code
    * void NetIPCb(uint32_t IPAddr, uint32_t IfIndex, uint32_t fAdd);
    * @endcode

    For the same boards and same binary, they may be some hardware problem. If the NC_NetStart() didn't return. You may set break point in the 3 callback functions to see which is stuck. I guess it would be NetStartCb() to open the network. You can step through this code, most likely some SGMII or MDIO level code get stuck.  

    Regards, Eric