How to add a blinky LED task with FreeRTOS on the emSBC-Neon (STM32F469)

The emSBC-Neon is a single board computer with the emstamp-neon module. This module is powered by the STM32F469 from STMicroelectronics and run FreeRTOS. In this blog post, we are going to see how we can add a simple task (or thread) using the set of free tools from STMicroelectronics. If you are not already familiar with the tools, please read the
“emSTAMP-Neon Software Manual Developer Kit” available on our Support page.

First, we need to open the *.ioc file of your emSBC-Neon project with STM32CubeMX.

  • Click on the Configuration Tab

STM32CubeMX emSTAMP-neon

  • In the “Configuration” tab, open the FreeRTOS configuration

STM32CubeMX emSTAMP-neon

Now you can add a new Task and complete the settings of this task. The name of the entry function is very import for the next step.

Now you can generate the code and open it with the System Workbench for STM32.

Open the main.c file and find the code of your task.

  • Add the following lines of code in the infinite loop:

main.c infinite loop

  • Don’t forget to add the declaration of the LED pin the main.h like this:

Private define

  • Build your code and flash it in your emSBC-Neon.

You should now see your LED blinking!

You can now play with the OSDelay() function to make it blink faster or slower!

blinky emSTAMP-Neon



Back