nRF51 SDK - S110 SoftDevice
|
The Real Time Counter Example enables the real-time clock (RTC) with a TICK frequency of 8 Hz. It also configures and enables the TICK- and the COMPARE0-interrupts. The compare interrupt handler is triggered three seconds after the RTC starts. The TICK interrupt handler clears the interrupt request and toggles PIN8 (LED 1). The COMPARE0 handler clears the interrupt request and sets PIN9 (LED 2) to 1.
The application starts with configuring the GPIO and starting the internal low frequency clock oscillator (LFCLK XTAL oscillator). The RTC is configured with TICK for 8 Hz and COMPARE0 to 3 seconds.
The name of the example is rtc_pca10028. If you are not using the Keil Pack Installer, you can find the source code and project file of the example in the following folder: <InstallFolder>\Nordic\nrf51\examples\peripheral\rtc
LED assignments:
Test the Real Time Counter Example application by performing the following steps: