TIDUE59A May 2018 – September 2020
The CC3220S acquires the current date and time using SNTP. Connecting to the NTP server, requesting the date and time, and interpreting the timestamp is handled by the Net Utils and SNTP libraries included in the CC3220 SDK. These libraries are built to use a predefined set of NTP servers to request the date and time. The application code used to make the request and update the RTC value can be found in the setTime() function defined at the top of wifi_doorlock_app.c.
The RTC must be set for the device to verify peer certificates are being used during their stated validity period. Without setting the RTC to the current network time, the connection to the server could fail or the device could be exposed to an insecure connection.