Skip to content

Releases: karangandhi-projects/stm32-smart-sensor-hub

v0.4.0 – Dynamic Sensor Sampling Based on Power Mode

02 Dec 06:13
be03c75

Choose a tag to compare

🚀 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

02 Dec 04:52
716b959

Choose a tag to compare

Added

  • Power Manager Module

    • New power/ folder with power_manager.c/.h
    • Abstract power modes: ACTIVE, IDLE, SLEEP, STOP
    • Tracks current and requested mode
    • Logs mode transitions and counts idle cycles
  • CLI (Command Line Interface)

    • New common/cli.c/.h
    • Line-based UART interface over USART2
    • Commands:
      • help
      • log off|error|warn|info|debug|pause|resume
      • pmode active|idle|sleep|stop
      • status
    • Pausable logging:
      • log pause temporarily disables task logs
      • log resume restores previous log state
    • Dashboard-style UX:
      • Logs scroll above
      • CLI prompt and partial input line are redrawn after each log line
  • Logging Enhancements

    • Runtime log control:
      • Log_Enable()/Log_IsEnabled()
      • Log_SetLevel()/Log_GetLevel()
    • Log output now:
      • Starts with \r to avoid mixing with CLI prompt
      • Calls CLI_OnExternalOutput() to maintain a clean CLI line
  • GitHub Actions CI

    • New workflow: .github/workflows/ci.yml
    • Uses gcc-arm-none-eabi on Ubuntu
    • Compile-only build of all .c sources on push/PR to main

Sensor Abstraction and Simulated Sensor

02 Dec 04:51
716b959

Choose a tag to compare

Added

  • sensors/ module:

    • sensor_if.c/.h with SensorIF_t abstraction
    • Simulated temperature sensor implementation
    • Central function Sensor_GetInterface() to obtain the active interface
  • SensorSample task:

    • Periodically reads data from the sensor interface
    • Logs value and timestamp via logging subsystem

Changed

  • Application code now interacts only with the SensorIF_t interface, 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

02 Dec 00:58

Choose a tag to compare

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.
  • 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