General-purpose input/output (GPIO) is a generic pin on an integrated circuit whose behavior—including whether it is an input or output pin—is controllable by the user at run time.

GPIO pins have no predefined purpose, and go unused by default. The idea is that sometimes a system integrator who is building a full system might need a handful of additional digital control lines—and having these available from a chip avoids having to arrange additional circuitry to provide them. [Read more…]

Wide box Tiny box List
Ascent Descent

Dealing with LEDs using a STM32

This first collection of examples and exercises is focused on LEDs. This article is mainly related to the article about STM32 GPIO peripheral. To understand this article you should be able to create, build and run a custom project for STM32 development board using ChibiOS. In what follows I will not add downloadable projects because putting examples to work is actually part of the exercise.

The following concepts could be easily applied to every STM32 development board. If you have any question ask support commenting this article or subscribing to our forum.

Create a continue reading...

Using STM32’s GPIO with ChibiOS’ PAL Driver

The STM32 is equipped with an extremely flexible General Purpose Input Output (or GPIO) peripheral allowing to configure each Input/Output independently. The IO is the simplest interface between the STM32 and the outside world.

As we said in the article “From 0 to STM32“, there are many versions of the same peripherals across the various STM32’s sub-families and this is way each sub-family usually has its own Reference Manual. In this document it is possible to find all the functional information about GPIO and reading many RM we can notice that GPIO peripheral has three continue reading...

Hello ChibiOS

Hello ChibiOS

One of most important feature of ChibiOS is multi-threading. Oversimplifying, a thread could be imagined like a sequence of instructions (with associated a priority and a working area) and multi-threading means kernel can manage more than a thread independently, executing them in a parallel fashion even if there is a single core.

Achieving this requires Kernel must plan operation sequence: this task is called scheduling. We could act indirectly on this operation though priority levels. Priority follows a simple rule:

among all the threads ready for execution, the one continue reading...