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.

TM4C1294NCPDT: Problem with "enet_sntp_lwip" example

Part Number: TM4C1294NCPDT

In the "enet_sntp_lwip" example for TIVA MCUs TM1294 family, the define SNTP_UPDATE_DELAY  determines the time period between two consecutive time updates from a designated NTP online server.

This value initially corresponds to one hour.

However, when I change this value to SNTP_UPDATE_DELAY  to 16000, the next NTP time update should occur after each 16 seconds. But, it only happens once at the beginning (which can be observed by an UART connection), and does not repeat after 16 seconds.

What could be the isssue.

Regards

  • Hi,

      The sntp.c file is part of the lwIP TCP/IP stack. I don't know as to why your new SNTP_UPDATE_DELAY is not taken to start the next update. I wonder if 16000 is the only problem or other delay times as having the same issue. Can you please check with lwIP forum if they can provide some guidance? 

  • I have tried for a number of SNTP_UPDATE_DELAY values, but it does not seem to produce the expected result.

    Namely, the example uses the function sys_timeout() to cast the call to several designated callback functions, and it is used for several purposes, not only for the SNTP_UPDATE_DELAY event.

    And it seems that sys_timeout() is a TI function used by the LWIP example. Also, if it does not work for the SNTP_UPDATE_DELAY event maybe it can produce some other issues in the rest of the example.

  • Hi,

     From wha I can tell, the sys_timeout is a function from lwIP stack which can be found at C:\ti\TivaWare_C_Series-2.2.0.295\third_party\lwip-1.4.1\src\core\timers.c.

  • Yes, sys_timeout() is part of LWIP, but the link with the LWIP time base and the TM4C1294 time base (which determines sys_timeout function operation) is unique for this microcontroller. And it does not seem to work.

    Namely, as far as I could check several timer related parts of the example "enet_sntp_lwip" are not functional, ie., the example is not functional.

    I have managed to run the example by issuing sntp request periodically from the TI's SysTick interrupt handler, but the original outline of the example should also work. I tried to vary SNTP and LWIP related defines with no positive outcome.