Sinapse-Energia / MIFARE-US

2 stars 0 forks source link

NTP Syncronization #12

Open sinapseenergia opened 7 years ago

sinapseenergia commented 7 years ago

In the initial planning we miss this part.

During initialization process, NTP have to be setup from server.

This means read time from server and set into micro-controller RTC.

This time have to be synchronized each certain time. (1 per day and when reboot is enough)

This is part of initialization process and affect to context definition (NTP server, NTP_server_time..)

soporteHW commented 7 years ago

It's necessary to include _MIC_GetRTC and _MIC_Set_RTC_ functions.

soporteHW commented 7 years ago

The following functions was implemented and included in "_southboundgeneric" files.

This function includes all NTP Sinchronization process (Connect to NTP server, send & receive NTP data and translate the received data), i.e, the function calls _TCPConnect(*) and _GET_NTPTime(*). Returns 0 if NTP OK or 1 if NOK.

This function translates the NTP received data, set internal RTC and update the Time_server param in Context.