GPIO

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 strictly related to some other articles which explains the fundamentals of STM32 programming with ChibiOS. There articles are:

From 0 to STM32, which is a light introduction to the STM32 microcontrollers and to its driver setup; Developing on STM32: introducing ChibiStudio, which explains how to setup a working environment for firmware development in Windows; A close look to ChibiOS demos for STM32, which explains how to deal with default demos of ChibiOS; Using STM32’s GPIO with ChibiOS’ continue reading...

Using STM32’s GPIO with ChibiOS’ PAL Driver

A microcontroller is a small computer integrated in a small chip designed to control electronic circuits: control involves interaction! A MCU must be able to interact with the external circuitry in order to address or sense it. The MCU is equipped with different peripherals designed to interact with external circuits.

Anyway all the MCU interactions must necessarily go through those small wires coming out from the microcontroller package: these metal contacts are named pins and they are used to solder the chip on a Printed Circuit Board (PCB). The name pin come out from 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...