An embedded project for STM32 implementing bit-packed data serialization, telemetry transmission, and high-speed UART-SPI communication.
- Efficient bit packing (4x 10-bit values into 5 bytes)
- Hardware acceleration: DMA for UART, STM32 hardware CRC
- Flexible configuration via
Config.h
- Two operational modes:
- Telemetry: periodic UART data transmission
- HighSpeedLink: UART reception → SPI transmission → response processing
- Debug support:
- Hex data dumps
- USART2 logging (debug builds only)
- Language: C++17
- Hardware: STM32F103RB (Nucleo board)
- Framework: libopencm3
- Tools: PlatformIO
- Algorithms:
- Bit packing (custom implementation + Antoine Beauchamp's BitReader)
- CRC-8 (hardware and software implementations)
src/
├── Config.h # User configuration
├── Device/ # Peripheral drivers
│ ├── Blinker.h # LED control
│ ├── HardwareUART.h # DMA-enabled UART
│ └── ...
├── Node/
│ ├── TelemetryUnit.h # Telemetry module
│ └── HighSpeedLink.h # UART↔SPI bridge
├── Serialization/ # Bit packers and hashers
└── Tool/ # Utility classes
- Install PlatformIO
- Clone the repository:
git clone https://github.com/your-repo.git cd your-repo
- Build and upload:
pio run -t upload
- For debugging:
pio run -e debug -t upload
- TelemetryUnit sends data (compile time + timer):
[UART] 34 12 05 00 00 A1 (packed data + CRC)
- HighSpeedLink receives it, transmits via SPI and outputs:
[SPI] 34 12 05 00 00 A1 Deserialized: 10:20:30
PRs and questions are welcome! No strict requirements for contributors.
- PlatformIO for the build system
- STMicroelectronics for STM32 and libopencm3
- Antoine Beauchamp for BitReader
- Open-source community for inspiration
Project is MIT licensed. See LICENSE for details.