In most of the wearable devices, data logging has become an integral part of the system. Along with logging the sensor data, time-stamp information is also logged to keep a track of the data w.r.t. the current time. For such cases, BLE protocol provides a Current Time Service (CTS) to get the current timing information from the mobile device.
In a CTS, a GATT Client, typically a wearable device, gets the current timinig information from a GATT Server, typically a mobile phone, and use this information to synchronize or set the system time.
In today's example, we demonstrate how to implement a Real Time Clock (RTC) using CTS and configurable wathcdog timers of PSoC 4 BLE device. In this example, the PSoC 4 BLE device, acting as the GATT Client, gets the current timing information when connected with the GATT Server and implements the RTC functionlity.