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.

NDK network shutdown.

Hello,

I'm working with C6748, NDK 2.20.05.33, BIOS 5.41.11.38.

We are developing a network application between the PC to DSP.

What are possible critical errors of which the stack calls NC_NetStop(-1) to shutdown the network?

Anatoly.

  • Anatoly,

    There are several places this could happen. The best thing to do is place a breakpoint in NC_NetStop and look at the back trace if this occurs. There should be a message also if you have DbgPrintf set to print to the console.

    Todd

  • Actually, I never received such errors till now, so I couldn't see the back trace or DbgPrintf  messages. 

    I just need to know what can effect the NDK to call NC_NetStop(-1) to protect my application from fatal errors.

  • Anatoly,

    A NC_NetStop(-1) happens where ever a DbgPrintf(DBG_ERROR,...) call occurs.

    Todd

  • Where and why the DbgPrintf(DBG_ERROR,...) call occurs?

  • The source code is included with the NDK. Take a look around and let me know if you have a specific question. 

    Todd

  • Hi,

    I have found references in the source code of the NDK for the DbgPrintf(DBG_ERROR, ...) calls.

    1. SBRead(), SBReadNC() and SBWrite() functions generate "Internal ATOMIC error". What is the atomic error in those cases?
    2. IFIndexNew() function generates "IFAllocateIndex: HTYPE %d". As far as I understood, this error indicates that the device chosen for the communication is neither Ethernet device nor PPP device. Can this error occur on run-time or initialization process, and why?
    3. BindNew() function generates "BindNew: Illegal Device Handle". Can it occur on run-time while using single Ethernet device and why?
    4. EtherRxPacket() function generates "EtherRxPacket: Invalid Handle". Can it occur on run-time and why?
    5. LLINew() function generates "LLINew: No Route". Can it occur on run-time and why?
    6. LLIRxPacket() function generates "LLIRxPacket: No Header". Can it occur on run-time and why?
    7. LLITxIpPacket() function generates "LLITxIpPacket: Bad Packet". Can it occur on run-time and why?
    8. LLITxIpPacket() function generates "LLIResolve: No DstMAC/Route". Can it occur on run-time and why?
    9. LLITxIpPacket() function generates "LLIResolve: Invalid Route %04x". Can it occur on run-time and why?
    10. LLITxIpPacket() function generates "LLIGenArpPacket: Illegal ARP Attempt - Check Configuration". Can it occur on run-time and why?
    11. LLITxIpPacket() function generates "LLIGenArpPacket: IPC Error". Can it occur on run-time and why?

    Thank you for support.

    Anatoly.

  • From the User Guide

    "The second way the stack can be shut down is when the stack code detects a fatal error. A fatal error is
    an error above the fatal threshold set in the configuration. This type of error generally indicates that it is
    not safe for the stack to continue. When this occurs, the stack code calls NC_NetStop(-1). It is then up to
    you to determine what should be done next. The way the NC_NetStart() loop is coded determines if the
    system will shut down (as in the example), or simply reboot."

    If a NC_NetStop(-1) is called internally, your NC_NetStart will return with -1. You should free the cfg and close via NC_SystemClose(). You may attempt to restart the entire NDK startup process over or reboot the device.

    Todd

  • I have read the user guide before posting a thread here, I need actually know what can make the stack to be not safe to continue. What are these fatal errors caused by? I need it for my application troubleshooting and protection from falling.

  • Anatoly --

    Unfortunately, we don't have this level of documentation.  The best I can suggest is to study the source code to try and understand how these errors can occur.

    Regards,
    -Karl-