Getting Started with STM32 and Nucleo Part 3: How to Run Multiple Threads with CMSIS-RTOS Interface

9/16/2019 | By Staff

On this STM32 video, we’re going to introduce FreeRTOS and show how to run multiple threads using the CMSIS-RTOS interface.

A real-time operating system (RTOS) is extremely useful for running concurrent tasks within the same program and offering a level of code portability. An RTOS differs from a general purpose operating system (e.g. Windows, macOS, Linux) by offering a guarantee to meet strict timing deadlines. As a result, you can find RTOSes used in many advanced microcontroller and embedded systems applications, such as cars, interplanetary rovers, rockets, and pacemakers.

In the video, we’ll demonstrate using FreeRTOS from the STM32CubeIDE. We’ll use the graphical interface to configure FreeRTOS and create 2 tasks (also known as “threads”). From there, we’ll write some simple code in those two different tasks to blink an LED. The catch is that they will try to blink the same LED! This should create some interesting effects on our STM32 Nucleo board.

The STM32 series is based on the ARM Cortex architectures. Specifically, we’ll be looking at the STM32 Arm Cortex-M microcontrollers. To make life easier, we’ll be using STMicroelectronics’ official Nucleo development boards (the Nucleo-L476RG in particular).

Related Items

Related Projects

Related Videos

Additional Resources

Download STM32CubeIDE:

STM32 HAL documentation (click on family from graphic and then Resources tab):

FreeRTOS documentation:

CMSIS-RTOS documentation: