STM32H457I Ethernet, LwIP and SNTP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-06-24 1: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 ?
- Labels:
-
Ethernet
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-09-16 2:36 AM
Hello @QRobe.1
- SNTP_SET_SERVER_TIME should be in sntp.c file
- Which prototype function you think is not called. Please provide more details about your example so that we can help you
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-09-16 4:39 AM
Hello,
Thanks a lot for answering but I made it work by myself.
