STM32L5 device use case
ITTIA DB Lite + STM32L5

Empowering Security & Low-Power Edge Data Management

Overview

ITTIA DB Lite brings secure and efficient data management to STM32L5 microcontrollers, enabling them to handle structured sensor data with deterministic performance in ultra-low-power environments. Leveraging the STM32L5’s Arm TrustZone-M security and hardware crypto features, ITTIA DB Lite ensures that sensitive data is stored and accessed safely, ideal for applications in healthcare, industrial safety, and secure IoT. Its capabilities for time-series storage, compression, and transactional integrity allow STM32L5 devices to log large volumes of data reliably while conserving memory and extending flash endurance. With on-device querying and support for lightweight AI/ML workloads, ITTIA DB Lite empowers STM32L5-based systems to analyze data locally, transmit only meaningful insights, and operate resiliently even with intermittent connectivity. This combination makes STM32L5 with ITTIA DB Lite an ideal foundation for portable, secure, and intelligent edge devices.

 

Case Study

The STM32L5 series microcontrollers combine Arm Cortex-M33 @ 110 MHz performance with advanced TrustZone-M security and ultra-low power operation, making them an excellent choice for connected, battery-powered devices that must handle sensitive data securely. When paired with ITTIA DB Lite, STM32L5 devices gain structured local data storage, time-series logging, real-time querying, and compression in a footprint optimized for resource-constrained MCUs. Together, they enable developers to build secure, data-driven devices that can operate offline, reduce cloud dependency, and make intelligent local decisions.

 

Use Case: Secure Medical Sensor Hub

Challenge

A healthcare company needs a portable patient monitoring device that can:

  • Collect ECG and pulse oximeter data securely.
  • Ensure HIPAA/GDPR-compliant storage using MCU hardware security.
  • Analyze data locally to detect anomalies in real time.
  • Operate continuously on battery for several days.
  • Share only critical alerts via Bluetooth or Wi-Fi.

 

System Architecture

  • MCU: STM32L562 (Cortex-M33, TrustZone-M, AES/PKA hardware acceleration)
  • Sensors: ECG (SPI), SpO2 (I²C), accelerometer (I²C)
  • Comms: Bluetooth Low Energy + Wi-Fi module
  • 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
    • Security: TrustZone-M + hardware crypto for secure key storage 

 

 

Implementation 
 
  1. Schema Design 
    CREATE TABLE patient_vitals (
        sample_time TIMESTAMP PRIMARY KEY,
        ecg_mV      FLOAT NOT NULL,
        spo2_pct    FLOAT NOT NULL,
        accel_x     FLOAT NOT NULL,
        accel_y     FLOAT NOT NULL,
        accel_z     FLOAT NOT NULL
    );
    
    CREATE TABLE alerts (
        event_time TIMESTAMP PRIMARY KEY,
        type       VARCHAR(32) NOT NULL,
        severity   VARCHAR(32) NOT NULL
    );
 
  1. Secure Data Logging (C API Example) 
    #include "medical_sensor_database.h" // generated from schema
    
    int main() {
       db_init_ex(DB_API_VER, NULL);
       open_medical_sensor_database("medical_sensor", NULL);
       // ...
    }
    
    void log_vitals(uint64_t ts_ms, float ecg, float spo2, float ax, float ay, float az) {
        db_t db;
        db_connect(&db, "medical_sensor", "ingestion", NULL, NULL);
        const patient_vitals_row_t row = {
            .sample_time   = ts_ms * 1000, // to microseconds
            .ecg_mV        = ecg,
            .spo2_pct      = spo2,
            .accel_x       = ax,
            .accel_y       = ay,
            .accel_z       = az
        };
        put_patient_vitals(db, row);
        db_disconnect(db);
    }
  • Data encrypted at rest using STM32L5 hardware crypto engine.
  • Batch commit ensures power efficiency and flash endurance. 

 

  1. Local Analytics & AI 
  • Query extracts recent samples to feed AI inference: 

    patient_vitals_row_t data_array[250];
    size_t result_count = 0;
    scan_patient_vitals_by_PK_desc(db, data_array, 250, &result_count);
    // ...
    const float ecg = data_array[0].ecg_mV;
    const float spo2 = data_array[0].spo2_pct;
    // ...
  • AI model detects arrhythmia patterns.
  • Alerts stored in the alerts table and transmitted securely when needed.

     

  1. Secure Data Sharing 
  • Only alert summaries (timestamp, severity, type) are shared via BLE/Wi-Fi.
  • ITTIA DB Lite enforces transactional integrity and works with TrustZone partitions to protect data from unauthorized access. 

 

Results

Metric

Value

ITTIA DB Lite footprint ~120 KB RAM + 180 KB Flash 
Insert latency (per row) ~40 µs 
Query last 250 rows < 3 ms 
Compression savings ~42% 
Power overhead for DB + AI tasks < 9% compared to baseline 
Data security AES-256 encryption with TrustZone keys 

 

Benefits
  1. Secure by design: ITTIA DB Lite leverages STM32L5 TrustZone and hardware crypto for encrypted, compliant data storage.
  2. Low-power logging: Optimized database operations extend battery life for portable devices.
  3. Local intelligence: AI inference enables anomaly detection directly on the MCU.
  4. Efficient communication: Only meaningful alerts transmitted, not raw sensor streams.
  5. Scalability: Schema and database engine portable to STM32U5 (higher performance) or STM32H7 (for more intensive analytics).

 

Conclusion

By combining the secure and power-efficient STM32L5 MCU platform with ITTIA DB Lite, developers can build trusted, intelligent, data-centric devices capable of secure local analytics, anomaly detection, and reliable offline operation. This solution is ideal for medical wearables, portable diagnostics, industrial safety sensors, and secure IoT systems where data privacy, power efficiency, and resilience are critical.