cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with getting time and date

NCatt.1
Associate III

Hello everyone,

I'm using STM32L496G-Discovery_Azure example of x_cube_azure package on my custom board and I have some problems when trying to connect to network to get network time for internal RTC. First steps of the function setRTCTimeDateFromNetwork() are done (get host by name, socket creation and socket settings) but the programm is block when it tries to connect to the socket, with the function net_connect() at line 133 of timedate.c file.

I now that I have a poor connection in my location and I think that it should be the problem. I already have been able to connect to network when having a better connection so I know that my hardware is working fine.

Does someone have any idea to solve this ? The main problem for me is that the blocking function does not have timeout, so the programm is in the function and never continues. How could I add a timeout in the net_connect() function ?

Thanks in advance

0 REPLIES 0