STM32H5
ITTIA DB Lite + STM32H5

Real-Time Data Management, Analytics & AI Capabilities

Overview

Data management for MCUs is the practice of efficiently collecting, storing, processing, securing, and distributing data directly on resource-constrained microcontrollers. Instead of only passing raw sensor readings to external systems, modern MCUs such as the STM32H5 can act as intelligent data nodes by sampling inputs from sensors and peripherals, storing them in ITTIA DB Lite, and running real-time queries or transformations such as filtering, aggregation, or signal analysis. With time-series storage, compression, and on-device querying support, devices can handle large volumes of sensor data while maintaining deterministic performance and low memory usage. There are applications that also seek AI enablement. ITTIA DB Lite data management enables AI workloads such as anomaly detection or predictive maintenance to run locally, reducing latency, conserving bandwidth by transmitting only insights instead of raw streams, and improving resilience when connectivity is intermittent. In short, data management with ITTIA DB Lite on MCUs transforms microcontrollers into intelligent edge devices capable of reliable local decision-making, real-time analytics, and AI-enhanced applications across industrial automation, automotive, medical, and smart energy systems.

 

Case study

This case study demonstrates how STM32H5 series MCUs paired with ITTIA DB Lite deliver deterministic, secure, and intelligent embedded data management for mission-critical IoT and industrial applications.

 

We will explore an example scenario, predictive maintenance in an industrial motor control system, to show how ITTIA DB Lite enables real-time data collection, time-series storage, local analytics, and AI inference directly on an STM32H5 microcontroller.

 

Why STM32H5 for Embedded Data-Centric Applications

The STM32H5 family (e.g., STM32H563/573) combines:

  • Cortex-M33 @ 250 MHz with DSP extensions and TrustZone security
  • Up to 2 MB Flash and 640 KB SRAM
  • Advanced peripherals (ADC, timers, comms)
  • Low power for always-on edge processing

Its performance and memory footprint make it ideal for embedded data management and lightweight AI workloads.

 

Why ITTIA DB Lite

ITTIA DB Lite is designed for MCUs:

  • Low footprint  
  • Real-time deterministic performance
  • Time-series and relational tables
  • On-device queries
  • Data compression for storage efficiency
  • AI integration, store, process, and feed inference models locally
  • Data visualization with ITTIA Analitica
  • Data distribution to MPUs with ITTIA Data Connect

Use Case: Predictive Maintenance for Industrial Motor Control

Challenge: 


An industrial equipment manufacturer needs to:

  • Continuously collect vibration, temperature, and current sensor data
  • Store weeks of time-series history locally for analysis
  • Run on-device anomaly detection
  • Transmit only critical insights to a supervisory MPU, minimizing bandwidth

System Architecture

Hardware:

  • MCU: STM32H573I-DK
  • Sensors: MEMS accelerometer, temperature sensor, current sensor via ADC
  • Comms: Ethernet & RS485
  • Storage: Internal Flash + optional QSPI external Flash

Software Stack:

  • OS: FreeRTOS/ Eclipse ThreadX RTOS /Zephyr
  • Database: ITTIA DB Lite
  • AI Model: NanoEdge AI Studio, LiteRT (TensorFlow Lite Micro) anomaly detection model
  • Visualization: ITTIA Analitica dashboard via ITTIA Data Connect (optional)
 
Implementation
  1.  Schema Design

A time-series data stream and table capture sensor readings:

CREATE STREAM motor_metrics (
    instance_id    INTEGER NOT NULL,
    sample_time    TIMESTAMP NOT NULL,
    vibration_RMS  FLOAT NOT NULL,
    temperature_C  FLOAT NOT NULL,
    current_amp    FLOAT NOT NULL,
    PRIMARY KEY (instance_id, sample_time)
);

CREATE TABLE motor_metrics_1Hz (
    instance_id       INTEGER NOT NULL,
    start_time        TIMESTAMP NOT NULL,
    end_time          TIMESTAMP NOT NULL,
    avg_vibration_RMS FLOAT NOT NULL,
    avg_temperature_C FLOAT NOT NULL,
    avg_current_amp   FLOAT NOT NULL,
    PRIMARY KEY (instance_id, start_time)
);
CREATE INDEX idx_vibration ON motor_metrics_1Hz(avg_vibration_rms);

CREATE TABLE anomaly_events (
    instance_id INTEGER NOT NULL,
    event_time  TIMESTAMP NOT NULL,
    score       FLOAT NOT NULL,
    severity    VARCHAR(32) NOT NULL,
    PRIMARY KEY (instance_id, event_time)
);
 
  1. Data Ingestion 

C code with ITTIA DB Lite API: 

#include "motor_control_database.h" // generated from schema

int main() {
   db_init_ex(DB_API_VER, NULL);
   open_motor_control_database("motor_control", NULL);
   // ...
}

void log_sensor_data(uint64_t ts_ms, float vib, float temp, float curr) {
    db_t db;
    db_connect(&db, "motor_control", "ingestion", NULL, NULL);
    const motor_metrics_row_t row = {
        .instance_id   = 1,
        .sample_time   = ts_ms * 1000, // to microseconds
        .vibration_RMS = vib,
        .temperature_C = temp,
        .current_amp   = curr
    };
    put_motor_metrics(db, row);
    db_disconnect(db);
} 
  • Sampling rate: 100 Hz (with downsampling to 1 Hz for stored records)
  • Data compression enabled → ~40% storage savings 

 

  1.  Local AI Inference 

Every second, an MCU callback function:

  1. Receives the last N samples from an ITTIA DB Lite streaming window query
  2. Normalizes and feeds them to an AI model
  3. Flags anomalies and stores events in the anomaly events table.

 

  1. Data Sharing 

When an anomaly is detected:

  • Summary (timestamp, type, score) sent over UART/Ethernet to an i.MX MPU running Linux/QNX/VxWorks/Etc.
  • MPU visualizes aggregated events in ITTIA Analitica dashboard
  • Benefit: No raw sensor stream leaves MCU → bandwidth saved, privacy improved 

 

Results
MetricValue
Storage footprint (ITTIA DB Lite) ~140 KB RAM + 200 KB Flash 
Avg. insert latency (1 row) 40 µs 
Query (last 1,000 samples) latency < 5 ms 
Compression savings ~40% on time-series data 
Anomaly detection rate 98% (tested against known failure data) 
Power impact < 5% CPU load avg.  

 

Key Advantages 
  1. Deterministic performance, guaranteed latency for real-time loops
  2. Security, STM32H5 TrustZone + ITTIA DB Lite secure storage
  3. On-device intelligence—no cloud dependency for critical decisions
  4. Interoperability—data can be synced to MPU or cloud when needed
  5. Scalable—same schema/codebase runs on larger STM32H7 or MPU with ITTIA DB 

 

Conclusion

This STM32H5 + ITTIA DB Lite design enables mission-critical data management including AI-enhanced data preparation at the MCU edge. The combination offers:

  • Data storage and management
  • Real-time analytics
  • Storage efficiency
  • AI-driven insights
  • Seamless integration with higher-tier systems

This approach applies to industrial automation, medical devices, energy monitoring, smart building systems and other related applications.