SerialPulse Studio v1.0
STM32 High-Speed Preset • 921600 8N1

STM32 UART High-Speed Viewer & DMA Telemetry Plotter

Pre-configured at 921600 baud (LF) for ST-LINK Virtual COM Port (VCP), STM32F4/G4/H7, and non-blocking DMA UART streams.

High-Frequency STM32 Telemetry via ST-LINK VCP and DMA

For Field-Oriented Control (FOC) motor drives, Digital Signal Processing (DSP), or high-rate IMU/ADC acquisition on STM32F4, STM32G4, and STM32H7 targets, running UART at 921600 baud delivers over 90 KB/s of throughput without blocking the main control loop when paired with HAL_UART_Transmit_DMA().

// STM32 HAL (C) Example — Non-blocking UART DMA transmission @ 921600 baud
char txBuf[64];
int len = snprintf(txBuf, sizeof(txBuf), "Iq:%.3f Id:%.3f RPM:%d\n", iq_meas, id_meas, rotor_rpm);
HAL_UART_Transmit_DMA(&huart2, (uint8_t*)txBuf, (uint16_t)len);
Engineering Documentation & Protocol Reference

Complete Guide: Real-Time Serial Monitor & Plotter via WebSerial and WebBluetooth

Learn how to stream high-frequency sensor telemetry from Arduino, ESP32, RP2040 (Raspberry Pi Pico), and STM32 microcontrollers directly into your browser without installing desktop drivers or heavy IDE suites.

1. How to Use WebSerial with Arduino & ESP32 (C++ Code)

USB CDC / UART

The built-in auto-parser in SerialPulse Studio automatically detects Key:Value pairs and names each variable in the plotter legend. Use 115200 baud (or higher) to minimize UART transmission latency:

// C++ Example for Arduino / ESP32 (50Hz Real-Time Telemetry)
#include <Arduino.h>

unsigned long lastSampleMs = 0;
const unsigned long SAMPLE_INTERVAL_MS = 20; // 50 Hz

void setup() {
  Serial.begin(115200);
  while (!Serial) { delay(10); }
  Serial.println("[SYS] Sensor Node Initialized @ 115200 baud");
}

void loop() {
  unsigned long now = millis();
  if (now - lastSampleMs >= SAMPLE_INTERVAL_MS) {
    lastSampleMs = now;
    float t = now / 1000.0f;

    // Replace with real sensor readings (e.g. BME280, MPU6050, INA219)
    float tempC = 24.5f + 2.5f * sin(2.0f * PI * 0.5f * t);
    float humPct = 55.0f + 5.0f * cos(2.0f * PI * 0.25f * t);
    int adcRaw = analogRead(A0);

    // Key:Value Format (Recommended for named multi-channel plotting)
    Serial.print("Temp:");
    Serial.print(tempC, 2);
    Serial.print(" Hum:");
    Serial.print(humPct, 2);
    Serial.print(" ADC:");
    Serial.println(adcRaw);
  }
}

2. Wireless Telemetry via WebBluetooth (ESP32 BLE NUS)

BLE GATT 6E400001

To monitor mobile robots, drones, or galvanically isolated high-voltage systems, configure your ESP32 or Nordic nRF52 peripheral with the industry-standard Nordic UART Service (NUS) UUIDs:

// Standard Nordic UART Service (NUS) UUIDs
#define SERVICE_UUID           "6e400001-b5a3-f393-e0a9-e50e24dcca9e"
#define CHARACTERISTIC_UUID_RX "6e400002-b5a3-f393-e0a9-e50e24dcca9e"
#define CHARACTERISTIC_UUID_TX "6e400003-b5a3-f393-e0a9-e50e24dcca9e"

// Transmit newline-terminated string via BLE GATT Notify:
char payload[64];
snprintf(payload, sizeof(payload), "Vbat:%.2f Roll:%.1f\n", vbat, roll);
pTxCharacteristic->setValue((uint8_t*)payload, strlen(payload));
pTxCharacteristic->notify();
BLE MTU Note: Default BLE packets carry 20 bytes of payload (or up to 247/512 bytes when negotiating esp_ble_gatt_set_local_mtu(247)). Our line accumulator automatically reassembles fragmented BLE notifications until a \n or \r\n delimiter arrives.

3. Data Formats Supported by the Automatic Serial Plotter

Every line reconstructed by the LineBreakTransformer is inspected in under 0.02 ms and automatically routed into one of four numeric telemetry formats or logged as a system message in the terminal:

A. Key:Value Pairs
Temp:23.5 Hum:45.1 PWM:128

100% compatible with Arduino IDE 2.x Serial Plotter. Accepts : or = separators.

B. CSV (Comma-Separated)
23.50, 45.12, -9.81, 1013.25

Automatically labels channels as CH1, CH2, CH3, CH4 with minimal UART byte overhead.

C. Space / Tab Delimited
23.50 45.12 1023

Ideal for lightweight printf("%f %f\n", a, b) calls in STM32 HAL or bare-metal C.

D. Single-Line JSON
{"v":3.31,"i":0.42,"t":38.5}

Extracts all numeric keys from single-line JSON payloads emitted by ESP-IDF or ArduinoJson.

4. Privacy, Security & Anti-Crash Architecture (Why Your Data Never Leaves Your Browser)

🔒 Direct Hardware USB/BLE → Browser I/O

The native navigator.serial and navigator.bluetooth APIs communicate directly with your operating system's USB/Bluetooth stack only after explicit per-device user permission. Zero bytes of serial telemetry are ever transmitted over the network.

🔄 Zero-Leak Circular Ring Buffer

Conventional web terminals append DOM nodes indefinitely and crash the browser tab after a few minutes at 115200 baud. SerialPulse Studio pre-allocates typed circular buffers (Float64Array) capped at 1,000–10,000 points, keeping RAM usage flat across multi-hour test runs.

⚡ Decoupled 60 FPS Canvas Rendering

Incoming UART stream decoding runs asynchronously in background microtasks, while chart redraws on HTML5 Canvas 2D (uPlot) are batched to your display refresh rate via requestAnimationFrame.