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.

RTOS/TM4C1294NCPDT: NTP task "syncTime" bus fault - should I stop the NTP service if I disconnect network?

Part Number: TM4C1294NCPDT

Tool/software: TI-RTOS

Relevant details:

TIRTOS Version: 2.16.00.08

NS 1.11.00.10

After my device acquires an IP address, I setup SNTP and it syncs time fine.

I was just testing multiple device ethernet resets for reliability testing and found that at one point, the syncTime task had a fault.

Is this my fault because I let the sntp task keep running even though I was removing network connectivity intermittently?

In the picture below, I highlighted the events that happen right before this issue.

First the network removal (part of my testing), I am physically switching the ethernet connection to the device.

Second the retransmit timeouts. Not unexpected because I have ongoing HTTP tasks that might get interrupted.

Third, the Illegal ARP attempt. I have no idea what that is.

Other items of note are the heapmem out of memory. I am currently using 99% of my SRAM and haven't had a chance to try and fix that yet. But the heapmem out of memory I think is only happening because I'm forcing multiple HTTPS failures back to back very quickly by pointing to a bad URL. I don't see this normally of course. I think this can be ignored unless you think it could be causing the bus fault in syncTime.

Any help would be much appreciated. If there is other information I can provide, or something obvious I missed, please let me know. Thank you!

--Subhash

I have attached my ROV view and the stack trace stuff that I thought might be useful:

This is the point in the code where it hit's the fault:

  • Hi Subhash,

    S D said:
    I was just testing multiple device ethernet resets for reliability testing

    Are you shutting down the networking stack? If not, how are you generating this?

    Todd

  • I am not shutting down the network stack. I am physically removing the ethernet from the device and reconnecting it.
  • It looks like the NDK stack has been shut down. I see that it's terminated in your screen shot:

    Can you try closing down SNTP upon NDK shut down? You can use the NDK hook functions to do this (e.g network close hook).

    The hooks are accessible via the ti.ndk.config.Global module of your configuration file.

    Steve

  • Hi Steve,

    Thanks for the reply. I didn't notice that the ndk thread was terminated.

    I am NOT intentionally shutting it down. Could it be crashing or being closed due to an error instead? That explains why I not getting the callbacks though...

    Do you have any recommendations on how to correctly handle network disconnection events for NDK, SNTP, and related functions?

    I have implemented a change where I stop the SNTP when I lose network connectivity. I'll try and reproduce the issue again if I can.

    Thanks!
    --Subhash