Skip to content

Examples made for the NeaPolis Innovation Summer Campus

Notifications You must be signed in to change notification settings

delloiaconos/chibios-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChibiOS Examples

A set of examples made for ChibiOS/RT 21.11.x (Vettica) + HAL stable branch . These examples have been tested on ChibiStudio 2023-02 for Windows.

ChibiStudio version: Sourceforge ChibStudio Project

ChibiOS version: ChibiOS 21.11.x

These examples are cured by Salvatore Dello Iacono, for the NeaPolis Innovation Summer Campus's Tutors and Students.

Examples

You can read and travel the examples as you desire, but the suggested path is the following: ** Only here listed examples have been updated and successfully tested!**

  • GPIOs Peripheral
  • UART and SERIAL Peripheral
  • ADC (Analog to Digital Converter) Peripheral
  • DAC (Digital to Analog Converter) Peripheral
  • TIMER Peripheral
    • GPT (General Purpose Timer) Drivers
    • ICU (Interrupt Capture Unit) Drivers
    • PWM (Pulse Width Modulation) Driver
  • ChibiOS Multithreading Examples
  • ChibiOS Shell Examples

GPIO

  • GPIO01 - Onboard Green LED Toggling.
  • GPIO02 - Generic output PIN configuration and use.
  • GPIO03 - PAL LINE usage and Thread example.
  • GPIO04 - Reading the on-board user button.
  • GPIO05 - A simple way to debounce an external button.
  • GPIO06 - Multithreading use of GPIO with button and LED.
  • GPIO07 - Iterate through an array of output lines.
  • GPIO08 - How to use PAL Events and callbacks to measure time.

ADC

  • ADC00 - ADC Base Project.
  • ADC01 - Simple single acquisition/channel ADC in a thread.
  • ADC02 - Asynchronous conversion call.
  • ADC03 - Asynchronous sampling and over serial display.
  • ADC04 - TIMER triggered ADC conversion.

SHELL

  • SHELL00 - ChibiOS adapted Demo Project.
  • SHELL01 - Static shell thread with custom commands and configuration.
  • SHELL02 - Project with local custom shell.
  • SHELL03 - Using the shell as a menu.

ICU

  • ICU00 - Simple example with ICU

PWM

  • PWM00 - Simple exampl with PWM

Multithreading

  • THD00 - (Unsafe) Sharing variable between threads.
  • THD01 - A simple parametric thread.
  • THD02 - Multiple parametric threads with static allocation.
  • THD03 - Multiple parametric threads from the heap.
  • THD04 - Sinchronize threads with mutex.
  • THD05 - Managing threads (suspend & resume).
  • THD06 - Producer/Consumer with FIFOs.

Running examples

1 - You can either download the zipped version of this repository or clone the repository into the ChibiStudio directory.

2 - Import the projects into the ChibiStudio workspace (you can also leave the "Copy project into workspace" option unchekced if downloaded correctly the repository)