2022-06-24 01:48 AM
Hello, I was wondering how to implement a SNTP Client.
I am using the STM32H745I board and I am able to ping through Ethernet, without OS. From what I have understood so far, I am supposed to redefine a macro called SNTP_SET_SERVER_TIME. Am I supposed to this in the file lwipopts.h or sntp.c ? . Then, the prototype is defined in the main.c for setting the time.
In the main.c, three functions are called :
- sntp_setoperatingmode(SNTP_OPMODE_POLL);
- sntp_setservername(0, "pool.ntp.org");
- sntp_init();
And in the main loop, there are two functions called :
- ethernetif_input(&gnetif);
- sys_check_timeouts();
It seems that the prototype of the function is never called, do you have any ideas or advice to give ?
2022-09-16 02:36 AM
Hello @QRobe.1
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2022-09-16 04:39 AM
Hello,
Thanks a lot for answering but I made it work by myself.