ChibiOS and STM32

ChibiOS is a compact and fast real-time operating system supporting multiple architectures. It offers a multi-threading scheduler and related APIs to manage threads scheduling and priorities, events and inter-thread communication. It also provide an Hardware Abstraction Layer.

STM32 is a broad family of 32-bit microcontrollers based on ARM Cortex-M architecture. With hundreds of different chips, STM32 covers a broad range of applications. Thanks to cheap and valuable development kits it is quite easy to evaluate them or create an prototype.

No matter what they say, you will not be able to appreciate the performance of these MCUs without a good scheduler. Here we will provide resources to getting started with STM32 development board using ChibiOS/RT as kernel and ChibiOS/HAL as drivers. Pick one and read it! If you like it don’t forget to Share the knowledge.

Wide box Tiny box List
Ascent Descent

Getting started with mikroe BUZZ Click using ChibiOS/HAL

Getting started with mikroe BUZZ Click using ChibiOS/HAL

BUZZ Click is a click board with a mikroBus form factor. It is substantially composed of a piezoelectric speaker having a resonant frequency at 3.8 kHz: this means we should expect best performances at this frequency. Let’s take a look to the principle of operation of DC and AC buzzer.

A piezoelectric loudspeaker also known as buzzer uses the inverse piezoelectric effect for generating sound. The piezoelectricity is a phenomena where mechanical stress produces the accumulation of electrical charges and then a voltage across the material. The inverse principle is true continue reading...

Mikroe Clicker 2 for STM32 and STLink v2

Mikroe Clicker 2 for STM32 and STLink v2

In this tutorial we are going to see how to connect a STLink v2 debugger to a Clicker 2 for STM32 enabling users to do debugging which could be very useful in development phases. A debugger is a computer program which is used to test and debug another program usually named Target.

In embedded things are slightly different since the code is executed on an external MCU and it is required an interface Computer-MCU. In this case the Target is the MCU and a debugger is composed by the ensemble of a hardware and a software tool. Nonetheless, when the majority of people is continue reading...

Getting started with mikroe Clicker 2 for STM32 with ChibiOS

Getting started with mikroe Clicker 2 for STM32 with ChibiOS

The Clicker 2 for STM32 is a compact development kit by mikroe (also known as MikroElektronika). This board is equipped with 2 mikroBUS socket that allow to connect the Click Boards. These boards, designed by mikroe, are small add-ons that allow to easily connect most common devices to your MCU. Indeed, in the last years mikroe has produced a lot of Click Boards (more than one hundred) with an extended documentation and with code examples.

During the Maker Faire Rome 2015, we meet some mikroe employee and we have explained them the purposes of PLAY Embedded. Some weeks continue reading...

Reading a Joystick on STM32 using ChibiOS

Reading a Joystick on STM32 using ChibiOS

The joystick proposed here is much known between makers. It provides two axis and a key button and every axis is actually a potentiometer: that means axis data is analogue and we need to use ADC to read its positioning.

Potentiometers are provided of springs so, without forcing, wipers are approximately positioned in the centre of the two resistive elements. As this device is very simple to use, it is not easy find a related datasheet. Indeed, for the most of the applications, it would be useless. Anyway, joystick used in this demo is a very cheap one marked as continue reading...

7-segment display and STM32 using ChibiOS

7-segment display and STM32 using ChibiOS

We have already introduced MAX7219 in STM32, ChibiOS and a 8×8 LED Matrix, so we are going to jump directly to code section. For convenience we just report link to documentation:

MAX7219 Datasheet

Note that even if pins are arranged in a different way, pin-out remains the same of the 8×8 LED matrix.

In this demo we are going to use Code-B decode to write with ease some number on our 8 digit 7-segment display.

In the demo shown in the video above we set up MAX7219 as normal operation mode, Code-B decode mode for each digit, scanning the whole display with the maximum continue reading...