STM32F7 device use case
ITTIA DB Lite + STM32F7

High-Performance Edge Data Processing & Management

Overview

ITTIA DB Lite empowers STM32F7 microcontrollers to manage continuous streams of sensor and application data with deterministic performance, transforming them into powerful edge-computing devices. With the STM32F7’s Cortex-M7 core up to 216 MHz, large memory capacity, and advanced connectivity (Ethernet, CAN, USB, TFT-LCD interface), ITTIA DB Lite provides structured time-series storage, compression, and on-device queries that let developers log, filter, and analyze data locally. This reduces bandwidth consumption by transmitting only meaningful results rather than raw streams and enables predictive maintenance, anomaly detection, and real-time analytics directly on the MCU. By combining STM32F7’s performance with ITTIA DB Lite’s efficient data engine, developers can build intelligent industrial gateways, smart building controllers, medical devices, and HMIs that are reliable, scalable, and capable of delivering local insight without relying on constant cloud connectivity.

 

Case Study

The STM32F7 series offers a powerful Arm Cortex-M7 core up to 216 MHz, large memory options (up to 2 MB Flash / 512 KB SRAM), rich multimedia features, and high-speed interfaces. It is widely adopted across industrial, medical, consumer IoT, automotive, and HMI markets, where reliable real-time data processing, connectivity, and graphics performance are critical. By integrating ITTIA DB Lite, developers can add structured storage, time-series management, querying, compression, and AI enablement directly to STM32F7 applications, turning them into intelligent data-centric nodes.

Use Case: Smart Building Energy Gateway

Challenge

A building automation company requires a local energy management gateway that can:

  • Collect high-frequency data from power meters, temperature, and occupancy sensors.
  • Store weeks of time-series data for local analysis and compliance reporting.
  • Run real-time analytics for demand response and anomaly detection.
  • Provide secure summaries to a central cloud system via Ethernet/Wi-Fi.

System Architecture

  • MCU: STM32F769NI (Cortex-M7 @ 216 MHz, 2 MB Flash, 512 KB SRAM)
  • Sensors: Smart power meters (Modbus/RS485), temperature & occupancy (I²C/UART)
  • Comms: Ethernet + Wi-Fi + USB OTG for expansion
  • 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
    • Data distribution to MPUs: ITTIA Data Connect

 

 
Implementation 
  1. Schema Design 
CREATE STREAM energy_data ( 
    sample_time   TIMESTAMP,
    meter_id      INTEGER,
    voltage_V     FLOAT NOT NULL,
    current_amp   FLOAT NOT NULL,
    power_W       FLOAT NOT NULL,
    temperature_C FLOAT NOT NULL,
    occupancy     INTEGER NOT NULL,
    PRIMARY KEY (sample_time, meter_id)
); 

CREATE TABLE events ( 
    event_time TIMESTAMP PRIMARY KEY,
    event      VARCHAR(32) NOT NULL,
    severity   VARCHAR(32) NOT NULL
);
  1. Data Logging (C API Example) 
#include "smart_building_database.h" // generated from schema

int main() {
   db_init_ex(DB_API_VER, NULL);
   open_smart_building_database("smart_building", NULL);
   // ...
}

void log_energy(uint64_t ts_ms, int id, float v, float c, float p, float temp, int occ) {
    db_t db;
    db_connect(&db, "smart_building", "ingestion", NULL, NULL);
    const energy_data_row_t row = {
        .sample_time   = ts_ms * 1000, // to microseconds
        .meter_id      = id,
        .voltage_V     = v,
        .current_amp   = c,
        .power_W       = p,
        .temperature_C = temp,
        .occupancy     = occ
    };
    put_energy_data(db, row);
    db_disconnect(db);
}

 

  • Sampling rate: every 100 ms per meter.
  • Batch commit improves flash endurance.
  • Compression reduces storage by ~40%. 

 

  1. Local Analytics & AI 

Every minute, an MCU callback function:

  1. Receives the last 1 hour of power data, as a running average, from an ITTIA DB Lite streaming window query.
  2. Feeds results into an AI regression model to predict peak loads.
  3. If anomalies are detected (e.g., sudden consumption spikes), logged to events table and pushed to HMI + cloud. 

 

  1.  Data Distribution 
  • Hourly summaries uploaded to cloud via Ethernet (MQTT).
  • Local HMI displays real-time graphs queried from ITTIA DB Lite.
  • Events pushed instantly over Wi-Fi to building management system.

 

Results
Metric Value 
ITTIA DB Lite footprint ~130 KB RAM + 200 KB Flash 
Insert latency (100 Hz per meter) ~35 µs per row 
Query last 1 hr (36,000 rows) ~5 ms 
Compression savings ~40% 
AI inference latency (TFLM) ~4 ms per prediction 
Bandwidth reduction > 85% vs raw streaming 

 

Benefits
  1. High throughput: STM32F7 handles kHz-level sensor streams with ITTIA DB Lite.
  2. Real-time analytics: Querry + AI model provide instant insights for energy optimization.
  3. Efficient storage: Compression reduces flash demand, enabling weeks of history.
  4. Local + cloud synergy: Summaries and events transmitted instead of raw data.
  5. Scalable solution: Same schema portable to STM32H7 (higher performance) or STM32L5/U5 (secure low-power variants). 

 

Conclusion

By combining STM32F7’s high-performance Cortex-M7 platform with ITTIA DB Lite’s embedded database engine, developers can build intelligent gateways and controllers capable of reliable local data processing, secure storage, and AI-driven analytics. This approach is ideal for building automation, industrial gateways, smart grids, and advanced HMIs, where performance, efficiency, and reliability are essential.