nRF51 SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Timer Example

Modules

 main.c
 Timer Example Application main file.
 

Detailed Description

The Timer Example demonstrate the use of the Timer peripherals. The timers are used to toggle pin 8 (LED 0) every 100ms. This example replaces the less accurate busy delay in blinky example with a more accurate hardware timer based delay.

The application starts with configuring the GPIO. The LED is toggled and the application waits for Timer0 to reach the capture/compare (CC[0]) value. This is done for all three timers in order.

Setup

Instructions on how to set up the nRFgo Motherboard: nRFgo Motherboard Setup (nRF6310).

LED assignments:

Testing

The Timer Example Application can be tested as follows:

  1. Compile and program the application.
  2. Observe that LED 0 toggles every 100ms.