Skip to content

Purpose

The Telemetry Node is the car's data gateway and logger. It sits on the vehicle CAN bus, listens to every board (gateways, ECU, BMS, inverters, LVSOC, dashboard, IMU), fuses in its own GPS, and then does three things with that data at once:

  • Logs everything to an SD card as CSV.
  • Streams it live over UDP to the pit.
  • Re-broadcasts a few derived values (GPS speed/heading, lap count) back onto the CAN bus for the rest of the car.

Everything is built around one idea: a single in-memory snapshot of the whole car (telemetry_data) that many producers write and many consumers read, safely and without locks.

What the board owns

The firmware is organized around a small set of responsibilities, each its own ThreadX thread:

  • Communication ingests the whole vehicle CAN bus, re-broadcasts derived values, streams telemetry over UDP, and pulls RTK corrections over NTRIP.
  • Data Processing holds the shared telemetry model (a lock-free seqlock) and serializes it to the CSV format shared by the log and the stream.
  • Sensors I/O owns the GPS receiver and the GPS-driven lap counter.
  • Storage writes the complete telemetry stream to the SD card without stalling sampling.

Hardware & stack

LayerWhat we use
MCUSTM32H563 (Cortex-M33)
RTOSAzure RTOS ThreadX
NetworkingAzure RTOS NetXDuo (Ethernet / UDP / TCP for NTRIP)
FilesystemAzure RTOS FileX (FAT on SD/MMC)
GPSUART + DMA, parsed with lwGPS, RTK corrections via NTRIP

How the data flows

Producers each own their own slice of telemetry_data and update it as data arrives. Consumers never read the live struct directly: they take a consistent snapshot first. The concurrency model behind this is in Telemetry Model.

Where to go next

Start with the Module Index for the full thread inventory, or jump into a group:

Configuration

All tunables (thread stacks/priorities, loop rates, buffer sizes, and network endpoints) live in one header, sys_conf.h. Change values there, not scattered through the code. Per-thread rates and priorities are summarized in the Module Index.

NOTE

Keep this live: if you change how a thread behaves, add a signal, or touch the CSV layout, update the matching page under the Telemetry modules in the same PR.

Released under the MIT License.