Close

From STM32F302 to STM32U575 — porting the FM module and getting USB composite to enumerate

A project log for OE5XRX — Open-Source Modular Remote Ham Station

A modular, repairable remote station for amateur radio — open hardware, built almost entirely AI-assisted.

peter-bucheggerPeter Buchegger 07/01/2026 at 20:470 Comments

The FM transceiver module in our remote station uses an STM32U575 as a USB bridge between the Raspberry Pi CM4 and an SA818 radio. To the Pi it shows up as a composite USB device - UAC2 (audio in/out), CDC-ACM (control / AT commands), and DFU (firmware update). So from Linux the radio is just a USB sound card plus a serial port, which keeps the host side clean.

One catch: our Zephyr board definition was still written for an STM32F302 (an earlier hardware revision). The new board is a U575 - different core (Cortex-M33), different clock tree, different USB IP. So this was a cross-family port, not a pin swap. The real work lived in the devicetree: rewriting the clock tree for the U5 (HSI48 as the USB 48 MHz source, PLL1 fed from MSI, 160 MHz core), moving to the USB OTG FS controller, switching the ADC to an async clock, and remapping pins.

Then the honest part. CI went green - but a green build proves it compiles, not that the clocks lock or that anything enumerates. The only real test is silicon. So: stencil, solder paste, hotplate reflow on the fine-pitch (0.5 mm) U575, power it up, plug it in - and UAC2 + CDC both enumerate on the host. The historically painful "Zephyr USB composite on a U5" actually works. (DFU still untested - that's next.)

And a classic hardware-humbling moment: the SA818 wouldn't answer over the serial link, and I burned time suspecting the firmware and the pin mapping - until I realized the SA818 needs its 12 V rail connected to wake up. Not a firmware bug. Just missing power.

On the AI angle, since we build this fairly openly with an AI coding assistant: the devicetree/Kconfig port is exactly the kind of pattern-heavy, well-documented work where the AI moved fast and got the structure right. What it can't do is tell you the 12 V isn't plugged in, or that a green build is lying to you. That line - AI for the port, hands-on-hardware for the truth - is pretty much where this project keeps landing.

Next up: connect 12 V and verify SA818 control, test DFU, then the actual point of all this - audio and PTT over the web.

Discussions