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

Developing on STM32: introducing ChibiStudio

Developing on STM32: introducing ChibiStudio

In this article we are going to set-up a ready-to-use Eclipse-based toolchain named ChibiStudio for the development on STM32. We will also explore this development toolchain explaining some basic operations necessary for daily development. So we will introduce the ChibiOS project, we will setup ChibiStudio taking a tour of some parts of it, we will import some ready to use projects and perform our first flash and run. Note that to proceed with this tutorial is necessary the installation of ST-Link drivers: this procedure has been shown in the previous article From 0 to continue reading...

From 0 to STM32

From 0 to STM32

Nowadays, we are surrounded by smart objects capable to do incredible things. These objects, known as Smart Things, are now can also communicate over different (wired and wireless) communication channels. The obvious consequence is that these objects are able to get and push data through the Internet: this phenomenon, this network of Smart Things, is commonly known as the Internet of Things or IoT. The spreading of the IoT is substantially due to two main con-causes:

the evolution of Microcontrollers which are increasing their performances while their price is continue reading...

Detecting obstacles using an ultrasonic sensor HC-SR04

Detecting obstacles using an ultrasonic sensor HC-SR04

HC-SR04 is a commonly used ultrasonic sensor which is capable to detect obstacles in a range of 2-300cm. The sensor looks like a small PCB having two metal cylinders on the front-side and a small circuit on the back-side (see Fig.1).

In this article we will provide a simple demo to use HC-SR04. This requires a preliminary read of the sensor user manual: HC-SR04 User Manual

The sensor has 4 PIN:

VCC, which must be connected to 5V; Trig, which is an input PIN to trigger the measurement; Echo, which is an output PIN which sent out a square wave; GND, which must be continue reading...

How to drive a HD44780 with I2C backpack with a STM32

How to drive a HD44780 with I2C backpack with a STM32

The HD44780 is a de-facto standard controller for display. We have already use it providing a source code to use a 16×2 LCD with a STM32. In this article we will step over introducing an I2C backpack for that display. Of course we will explain how to edit old code in order to get it work with this new hardware configuration.

Even if it is still popular, this controller was made commercially available in the late eighties. At that time serial communications were not so widespread because their were costly and involved constraint about clock speed. Because of that, the continue reading...

How to switch to the development version of ChibiOS

How to switch to the development version of ChibiOS

First time I started to deal with a software a little bit more complicated than the one used to print “Hello World”, I have encountered some words like “versioning”, “revision”, “diff”, “branch”, “trunk”, “checkout” and I heard about certain software like “svn”, “git”, “mercurial”.

Do you keep in mind when your friends knows something you don’t know and they continuously talk about that making you feel like a complete dumbass? Well that was my feeling! It is much simpler than how it seems: there are certain programs which purpose is to keep trace of every single character continue reading...