Embedded Firmware
Client mission · N7 ConsultingSOGECLAIR Simulation
I developed and validated the embedded C firmware of a simulator I/O board migrated from an Infineon XC167 to an STM32H753. The board drives cockpit equipment in pilot-training simulators. My firmware receives the host protocol over RS232 or native Ethernet, rebuilds the frames, runs the communication state machine and passes commands to the I/O layer, keeping the behaviour the existing simulators expect. I checked it with functional and non-regression tests.
What I built
- Serial transportUSART reception with DMA into receive buffers, so frames arrive without blocking the firmware. RS232 stays available and carries the same protocol.
- Ethernet transportNative Ethernet through the STM32H753 MAC, RMII and an external PHY, with LwIP carrying the protocol over TCP and UDP.
- Frame layerFrame reassembly from start and end markers, the legacy additive checksum, and a communication state machine with timers and retransmission.
- BehaviourHost commands keep priority over periodic refresh, and outputs keep the logical states the legacy board produced.
- ValidationFunctional and non-regression tests of the protocol behaviour on the STM32H753 target.
Before and after
Two problems worth explaining
- TCP is a byte streamOne receive can hold half a frame or several frames. The frame layer rebuilds frames from their markers and never assumes that a TCP segment, or a UDP datagram, is one frame.
- DMA meets the Cortex-M7 cacheThe Ethernet and UART DMA engines write memory that the core reads through its data cache. Buffers and descriptors need alignment and explicit cache maintenance, or non-cacheable regions, rather than a cache disabled for the whole firmware.
Validation results forthcomingComparison against the client's reference equipment.
Mission
Client mission through N7 Consulting. The client's hardware API, protocol documents and source code stay confidential.