|
F439_CPP_TX-RX_LoRa_Project
|
This page describes the high-level firmware architecture of the Nucleo-F439 LoRa TX/RX weather station system.
The firmware is intentionally organized into layered subsystems so that radio transport, protocol framing, application behavior, and hardware interfaces remain cleanly separated.
The architecture emphasizes:
This document serves as the primary architectural reference for the firmware.
Use the links below to jump directly into the subsystem-level documentation for each layer:
The documentation is intended to be read top-down:
Conceptual interaction flow:
The diagram below shows the intended steady-state interaction between the major firmware layers. The persistence path is shown as a side-path because replay-related FRAM access is coordinated by the RadioLink protocol layer rather than by the application layer directly.
The diagram below ties together the application layer, the RadioLink TX path, the on-air Wire v3 frame, and the corresponding RX-side processing path.
It is intended as the top-level lifecycle view for a frame moving through the system from application intent on one node to accepted payload delivery on the peer node.
The firmware is organized into the following layers:
Each layer has a clearly defined responsibility and interacts only with the layers immediately above or below it.
Module:
radioApp
Responsibilities:
The application layer does not construct wire frames directly. Instead it submits payloads to the RadioLink protocol layer which handles framing, counters, and replay protection.
Module:
radioLink
Responsibilities:
RadioLink defines the protocol structures used on the wire.
The core structures representing the wire protocol are:
These structures represent the logical model of a transmitted message and are intentionally preserved because they express the Wire v1+ framing model.
RadioLink is intentionally transport-agnostic. The current transport is LoRa through the SX1262 modem, but the framing layer is designed so that future transports could reuse the same message model.
Module:
SX1262 driver
Responsibilities:
The driver exposes a hardware-oriented modem interface while remaining independent of RadioLink framing policy.
Module:
MB85RS64B SPI FRAM
Responsibilities:
The firmware uses a minimal-write persistence strategy. Multi-byte sequential writes are supported by the FRAM hardware and are used through FRAM_WriteBytes().
Replay protection uses the epoch-per-boot model.
TX node behavior:
RX node behavior:
This design minimizes persistent writes while preserving replay resistance.
The firmware supports both TX and RX roles using the same firmware image.
The role is determined at runtime from the STM32 unique device ID (UID). This is an intentional design choice. Compile-time role switching through preprocessor macros is not part of the architecture.
The lowest layer is the STM32 HAL and board/platform integration logic.
This layer provides:
Most Cube-generated support files are excluded from Doxygen because they are generated infrastructure rather than project-owned architectural logic.
The steady-state interaction path is:
radioApp ↓ radioLink ↓ SX1262 driver ↓ STM32 HAL / board support
Persistent replay state is accessed through the FRAM persistence layer, which is used by the RadioLink protocol implementation.
This layered design keeps application behavior, wire protocol policy, radio hardware control, and persistent state management cleanly separated.