Releases: karangandhi-projects/stm32-smart-sensor-hub
Releases · karangandhi-projects/stm32-smart-sensor-hub
v0.4.0 – Dynamic Sensor Sampling Based on Power Mode
🚀 What’s New
This release adds a major power-efficiency feature: sensor sampling automatically adapts to the current power mode. This brings the project closer to real IoT sensor hubs that scale their activity based on available power and system load.
🔋 Sampling Behavior Per Mode
Power Mode | Interval | Notes
-- | -- | --
ACTIVE | 1s | Normal high-rate sensing
IDLE | 5s | Medium-rate sensing
SLEEP | 30s | Low-rate sensing
STOP | 0 (off) | Sampling disabled
🧰 Included in this release
-
Dynamic calculation of sampling intervals
-
STOP mode disables sampling
-
CLI now shows and updates sampling interval live
-
Task scheduling updated
-
Full documentation update
-
Phase 4 PR merged
v0.3.0 – Power Manager, CLI Dashboard, and CI
Added
-
Power Manager Module
- New
power/folder withpower_manager.c/.h - Abstract power modes:
ACTIVE,IDLE,SLEEP,STOP - Tracks current and requested mode
- Logs mode transitions and counts idle cycles
- New
-
CLI (Command Line Interface)
- New
common/cli.c/.h - Line-based UART interface over USART2
- Commands:
helplog off|error|warn|info|debug|pause|resumepmode active|idle|sleep|stopstatus
- Pausable logging:
log pausetemporarily disables task logslog resumerestores previous log state
- Dashboard-style UX:
- Logs scroll above
- CLI prompt and partial input line are redrawn after each log line
- New
-
Logging Enhancements
- Runtime log control:
Log_Enable()/Log_IsEnabled()Log_SetLevel()/Log_GetLevel()
- Log output now:
- Starts with
\rto avoid mixing with CLI prompt - Calls
CLI_OnExternalOutput()to maintain a clean CLI line
- Starts with
- Runtime log control:
-
GitHub Actions CI
- New workflow:
.github/workflows/ci.yml - Uses
gcc-arm-none-eabion Ubuntu - Compile-only build of all
.csources on push/PR tomain
- New workflow:
Sensor Abstraction and Simulated Sensor
Added
-
sensors/module:sensor_if.c/.hwithSensorIF_tabstraction- Simulated temperature sensor implementation
- Central function
Sensor_GetInterface()to obtain the active interface
-
SensorSampletask:- Periodically reads data from the sensor interface
- Logs value and timestamp via logging subsystem
Changed
- Application code now interacts only with the
SensorIF_tinterface, not with a specific sensor implementation. - Prepared the design so that a real sensor (I2C, SPI, etc.) can replace the simulated one without touching
app_main.
Phase 1: Skeleton, Logging, Task Manager
v0.1.0 — Phase 1: Skeleton, Logging, Task Manager
✅ Added
- Initial STM32CubeIDE project targeting the Nucleo‑F446RE board.
- Logging subsystem (
common/log.c,common/log.h):- UART2‑based logging with timestamps.
- Severity levels: DEBUG / INFO / WARN / ERROR.
- Automatic inclusion of file name, line number, and function name.
- Cooperative Task Manager (
app/app_task_manager.c,app/app_task_manager.h):- Registration of periodic tasks via
AppTaskManager_RegisterTask(). - Execution of due tasks based on
HAL_GetTick()timing.
- Registration of periodic tasks via
- Application entry logic (
app/app_main.c,app/app_main.h):- Initialization sequence with log messages.
- Registration of a Heartbeat task.
- Heartbeat task:
- Toggles the on‑board LED (PA5).
- Logs a message each time it runs, demonstrating scheduler + logging.
- Documentation:
docs/README.md– project overview and usage.docs/ARCHITECTURE.md– layered design explanation.docs/RELEASE_NOTES.md– this file.
⚠️ Known Limitations
- No sensor interfaces have been implemented yet.
- No explicit power management (sleep/stop modes) is in use yet.
- No communication protocol beyond debug logging over UART2.
- No RTOS; only a cooperative scheduler is available.
These limitations are expected at Phase 1 and will be addressed in:
- Phase 2 — simulated sensor and sampling task.
- Phase 3 — power management building blocks.
- Phase 4+ — communication stack and RTOS migration