Overview
Stats
87 commits, +4,231/-1,892 lines, 98 files, 15 active days
Languages
C (+2,156), Python (+892), Config (+412), Shell (+198), Other (+173)
Projects
widget-firmware (72), widget-cli (15)
October marked the beginning of a significant firmware modernization effort, transitioning the core widget controller from a bare-metal implementation to a structured RTOS-based architecture. This foundational work enables future feature development while improving system stability and power efficiency.
Key Changes & Features
- RTOS Migration
- Migrated the main event loop to FreeRTOS, enabling preemptive multitasking and improving responsiveness during high-load scenarios.
- Implemented task priorities for sensor polling, communication handling, and user interface updates.
- Added mutex protection for shared hardware resources (SPI bus, I2C peripherals).
- Power Management Foundation
- Designed a three-tier power management system: Active, Idle, and Deep Sleep modes.
- Implemented automatic sleep transitions based on inactivity timeouts.
- Added wake-on-interrupt support for external sensor triggers.
- Communication Stack Improvements
- Refactored the serial protocol handler to support asynchronous message processing.
- Added CRC-16 checksums to all command packets for improved reliability.
- Implemented a retry mechanism with exponential backoff for failed transmissions.
Technologies & Languages
- Embedded C: Primary language for firmware development targeting the STM32F4 series.
- Python: Used for the command-line configuration tool and automated test scripts.
- FreeRTOS: Real-time operating system providing task scheduling and synchronization primitives.
Patterns & Architecture
- Task-Based Design: Moved from a monolithic super-loop to dedicated tasks for each subsystem, improving code maintainability.
- Message Queue Communication: Implemented inter-task communication using FreeRTOS queues, decoupling producers from consumers.
- Hardware Abstraction Layer: Created a HAL layer to isolate hardware-specific code, enabling easier porting to new microcontrollers.