Blinky FreeRTOS Example

nRF5 SDK v11.0.0

nRF5 SDK v11.0.0

The Blinky FreeRTOS Example shows FreeRTOS features like Task, TaskDelay, and Timer.

Page-1 Sheet.15 Configuration and task creation Configuration and task creation Sheet.16 Rounded Rectangle main main Rounded Rectangle.18 Start the scheduler Start the scheduler Dynamic connector Dynamic connector.36 Rounded Rectangle.42 vLed0Function vLed0Function Sheet.45 Toggle LED0 Toggle LED0 Sheet.46 Delay 500 ms Delay 500 ms Dynamic connector.47 Dynamic connector.48 Sheet.49 Rounded Rectangle.55 vLed1Callback vLed1Callback Sheet.57 Toggle LED0 Toggle LED0 Rounded Rectangle.58 END END Dynamic connector.60 Dynamic connector.61 Orthogonal When main finishes, its stack is cleared and used by ISR and ... When main finishes, its stack is cleared and used by ISR and system. Reverse Task Task Reverse.56 Timer callback Timer callback

When the application starts, two GPIO pins are configured as outputs to drive the LEDs. Then a new thread and a timer are created.

Setup

You can find the source code and project file of the example in the following folder: <InstallFolder>\examples\peripheral\blinky_freertos

LED assignments:

  • LED 1 and LED 2: Blinking.

Testing

Test the Blinky FreeRTOS Example application by performing the following steps:

  1. Compile and program the application.
  2. Observe that the LEDs are blinking.
Note
See FreeRTOS support for more information about FreeRTOS.