STM32 (HAL) Platform
The STM32F103xB HAL platform of kbox-stack — Hal drivers, NCN5130/Elmos transceivers, an arm-none-eabi build, and OpenOCD flashing.
What this platform provides
kbox-stack is a portable KNX stack: its core is MCU-agnostic and talks to
hardware only through dependency-injected I<X> peripheral interfaces. STM32
(HAL) is one platform — today's — that implements those interfaces on top of
the ST HAL for the STM32F103xB family.
This platform gives you everything needed to run a certified-grade KNX device on real hardware:
Hal*peripheral drivers —HalKnxBusDriver,HalFlash,HalLed,HalIWDGWatchDog— plus portable helpers (BaseClock,BaseButton) that implement the core interfaces.- KNX line transceivers —
Ncn5130andElmosE98123drivers for the analog front-end that couples the MCU UART to the TP1 bus. - A prebuilt static library —
libkbox-stack---cortexm3---STM32F103xB.a, compiled for Cortex-M3 / STM32F103xB. - An
arm-none-eabiCMake build that links that.aand produces.elf/.hex/.bin. - OpenOCD flashing over ST-Link / SWD.
Target hardware
| Item | Value |
|---|---|
| MCU | STM32F103TBUx (Cortex-M3, 128 KB flash, 20 KB RAM) |
| KNX transceiver | NCN5130 (default) or Elmos E981.03 |
| KNX bus UART | USART2, 19200 baud, 9 data bits, even parity, 1 stop (9E1) |
| Debug / flash probe | ST-Link (SWD) |
| Toolchain | arm-none-eabi-gcc, CMake 3.22+ |
The reference application for this whole section is the led-indicator
example that ships inside the stack distribution
(examples/STM32F103-HAL/led-indicator/). Every page below reads from it.
What's included
Getting Started (STM32)
Project Setup (STM32)
Your First Application
STM32 HAL Peripherals
Flashing (STM32)
Portable core, this platform
The core stack is MCU-agnostic. It depends only on the I<X> peripheral
interfaces described in the core docs — never on STM32, the ST HAL, or any board.
The pages in this section are the STM32 (HAL) implementation of those
interfaces. A future platform (for example ESP32 or Zephyr) would be a sibling
section with its own drivers and its own rebuilt .a, while the application
code and stack API stay the same.
See the portable core: the peripheral contracts in Peripheral Interfaces, how the stack is assembled in Constructing the Stack, and how to bring up a new platform in Porting.