Event-driven automotive indicator system using STM32 & FreeRTOS
State Machine • Multitasking • Queue Communication
This project implements a real-time automotive indicator system using STM32F411RE and FreeRTOS.
It demonstrates task scheduling, inter-task communication, and deterministic state machine behavior.
- FreeRTOS-based multitasking
- Event-driven architecture (message queues)
- Finite State Machine (FSM)
- Software debouncing + long press detection
- Hazard mode priority handling
- Different blink rates for different states
+-------------+
| Button Task |
+-------------+
|
v
+------------------+
| Message Queue |
+------------------+
|
v
+------------------+
| Indicator Task |
| (State Machine) |
+------------------+
|
v
+-------------+
| LED Task |
+-------------+
| Current State | Input Event | Next State |
|---|---|---|
| IDLE | LEFT | LEFT |
| IDLE | RIGHT | RIGHT |
| IDLE | BOTH | HAZARD |
| LEFT | LEFT | IDLE |
| RIGHT | RIGHT | IDLE |
| ANY | BOTH | HAZARD |
| HAZARD | LEFT/RIGHT | IDLE |
- STM32F411RE (Nucleo Board)
- Onboard LED (PA5)
- Push Buttons (PC0, PC1)
| Mode | LED Behavior |
|---|---|
| LEFT | Slow Blink |
| RIGHT | Slow Blink |
| HAZARD | Fast Blink |
| IDLE | OFF |
Core/ ├── Src/ │ ├── main.c # RTOS tasks + logic │ Drivers/ # HAL drivers RTOS_Indicator.ioc # CubeMX config
- Open project in STM32CubeIDE
- Connect STM32 Nucleo board
- Build & Flash
- Press buttons to control indicator modes
- RTOS scheduling & task prioritization
- Queue-based inter-task communication
- Embedded state machine design
- Hardware interfacing with STM32 HAL
Pranav Krishnakumar Iyer


