Staging:CC3220 Get Network Time (Texas Instruments NDA restrictions applicable)

Overview
This application will demonstrate the usage of getting network time by using the SNTP (Simple Network Time Protocol) protocol.

Application Details
Get time application gives the current time in the configured time zone. This application can be used to get familiar with using UDP sockets to communicate with server.

Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks. For more details, please refer to Wikipedia: Network Time Protocol.

Prerequisite

 * 1x CC3220LP
 * 1x Micro-USB cable
 * 1x 2.4GHz AP with internet access

Source Files Details

 * main.c - Application code. Initializes the device in default configuration and performs all application tasks.
 * cc_launchpad.c - Initializes peripherals.
 * pinmux.c - Pinmux configurations as required by the application.
 * timer_if.c - Functions to control timer.
 * uart_if.c - Functions to display information on UART.
 * startup_*.c - IDE specific startup functions (not required when working with TI-RTOS).

Key Simplink API used

 * sl_Socket - creates UDP socket
 * sl_SendTo - sends UDP request to the NTP server
 * sl_Bind - binds UDP socket
 * sl_RecvFrom - receives time information from the NTP server
 * sl_Close - closes the UDP socket
 * sl_DeviceSet - sets the Simplink system time
 * sl_DeviceGet - gets the Simplink system time

Setting the NTP server
At the top of the main.c file, you may change the NTP server to connect to.

Depending on your current time and time zone, you may change the following fields to reflect the settings. The default time zone being used here is CST.

Example use cases and outputs
Once confirming all the above information to be correct, connect the boards, compile, and run the application.

Limitations/Known Issues
None