Examples using Zephyr RTOS on ST STM32F429I Discovery board using PlatformIO IDE
This repository contains examples of codes used in teaching, particularly at ESIEA.
4 examples are proposed:
- NoGUI - Using the 2 LEDs on the board and the button.
- 3 tasks are created:
- 1 task per LED with sporadic lighting (using k_msleep)
- 1 task allowing lighting the 2 LEDs when the button has been pressed (using interruption).
 
- An overlay is defined to show how to add the declaration of a new external LED, not used in the proposed code.
 
- 3 tasks are created:
- WithGUI - Using the board screen, touch interface, an image and an external sensor BME680 connected in I2C.
Temperature and humidity values are added to a chart and regularly printed on the screen using labels.
- Screen:
- The LVGL library is used, from the Zephyr framework.
- The appropriate configuration is made in the .conf file of the project, in particular to activate the management of:
- SENSORS and in particular the BME680 driver
- DISPLAY
- INPUT
- LVGL and its components (buttons, charts, labels, etc.)
- Debugging with SEGGER SystemView available on the SWD connector.
 
- The appropriate configuration is made in the .conf file of the board, in particular to activate the management of:
- ILI9341 driver used by the screen,
- I2C used by the BME680.
 
- An overlay is defined to specify that the BME680 is connected to I2C 3 of the board, with address 0x77.
 
 
- Screen:
- PeriodicTasks - Creation of 2 periodic tasks (using timers) with display on the LEDs integrated into the board and with a configurable duration (use of 'nop' to simulate the use of the processor).
- Samples - No task used, only example using DISPLAY, INPUT, BME680, SERVO and ADC (:warning: only one channel is used on SMT32 and this version of Zephyr).
Some details on versions used:
| Tool | Version | 
|---|---|
| PlatformIO (PIO) | Core 6.1.16 - Home 3.4.4 | 
| Zephyr RTOS | 3.6.0 (See all versions available for PIO here) | 
| LVGL | 8.3.11 (linked with Zephyr 3.6.0, see Changelog | 
Some useful links about the board:
| Link | Details | 
|---|---|
| ST STM32F429I Discovery | Details of the board on Zephyr doc | 
| ST STM32F429I Discovery Pin Mapping | Pin mapping of the board, from MBED doc | 
| ST STM32F429I Discovery Zephyr conf | Folder in Zephyr defining the board details | 
| ST STM32F429I Discovery Zephyr DTS | DTS file in Zephyr defining the board details | 
Some useful links about the Zephyr:
| Link | Details | 
|---|---|
| Zephyr Devicetree (DTS) and Overlay principles 1 2 | Details on how to use DTS and overlays | 
| Basic Display | Example using basic Display code on Zephyr | 
| LVGL | Example using LVGL and Display code on Zephyr | 
| Zephyr Threads | Doc on Thread in Zephyr | 
| Sleep and periodic tasks | Discussion on how to create periodic tasks on Zephyr | 
TODO
- update the ADC integration using overlay.
- see examples of teaching resources using Zephyr:
- Add example in "Samples" with a module, see the work of lilaiguernelala during her internship at ESIEA.