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 (recorded), (can also support temperature sensor, current sensor)
  • Comms: UART (can also support Ethernet)
  • Storage: QSPI external Flash (can also support MicroSD)

Software Stack:

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

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

CREATE TABLE vibration_raw_samples (
    instance_id                INTEGER NOT NULL,
    sensor_id                  INTEGER NOT NULL,
    motor_id                   INTEGER NOT NULL,
    sample_time                TIMESTAMP NOT NULL,
    acceleration_mps2          FLOAT32 NOT NULL,
    weighted_acceleration_mps2 FLOAT32 NOT NULL,
    inverse_variance           FLOAT32 NOT NULL,
    PRIMARY KEY (instance_id, sensor_id)
);
CREATE TABLE motor_health_samples ( instance_id INTEGER NOT NULL, motor_id INTEGER NOT NULL, sample_time TIMESTAMP NOT NULL, acoustic_mic_V FLOAT NOT NULL, acceleration1_mps2 FLOAT NOT NULL, acceleration2_mps2 FLOAT NOT NULL, acceleration3_mps2 FLOAT NOT NULL, temperature_C FLOAT NOT NULL, PRIMARY KEY (instance_id, motor_id) );
CREATE TABLE event_actions ( instance_id INTEGER NOT NULL, event_id INTEGER NOT NULL, inference_id INTEGER NOT NULL, event_time TIMESTAMP NOT NULL, reason_code VARCHAR(32) NOT NULL, -- or event_type: "threshold crossed", "persistent anomaly", etc. severity VARCHAR(32) NOT NULL, action_type VARCHAR(32) NOT NULL, PRIMARY KEY (instance_id, event_id) );

 

  1. Data Ingestion

C code with ITTIA DB Lite API:

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

int main() {
   db_init_ex(DB_API_VER, NULL);
   open_motor_health_database("motor_health", NULL);
   // ...
}

void log_sensor_data(uint64_t ts_ms, float mic, float vib[3], float temp) {
    db_t db;
    db_connect(&db, "motor_health", "ingestion", NULL, NULL);
    const motor_health_samples_row_t row = {
        .instance_id = 1,
        .motor_id = 1,
        .sample_time = {},
        .acoustic_mic_V = mic,
        .acceleration1_mps2 = vib[0],
        .acceleration2_mps2 = vib[1],
        .acceleration3_mps2 = vib[2],
        .temperature_C = temp,
    };
    put_motor_health_samples(db, row);
    db_disconnect(db);
} 
 
  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.