← Sun, Nov 8 digest

Playing with the STM32MP2

read article ↗ hn thread ↗

An engineer successfully boots the STM32MP2 application processor bare-metal from on-die SRAM without vendor SDKs and configures its PCIe SERDES block to interface with an FPGA.

read it A deep-dive hardware bring-up log detailing bare-metal execution on a complex MPU without vendor SDKs or external DDR.

summary

The author attempts to use the STM32MP2—a Linux-targeted dual Cortex-A35 SoC—as a high-speed microcontroller by bypassing standard vendor BSPs, U-Boot, and external DDR. Working entirely in SRAM using upstream tooling, they bring up the auxiliary Cortex-M33, boot the A35s in EL3 secure mode, and configure the high-speed COMBOPHY block for PCIe. Along the way, they uncover a SERDES PLL stability bug using an oscilloscope. It provides a rare look at bare-metal bring-up on a modern applications processor.

key points

  1. The STM32MP2 features dual Cortex-A35 cores, a Cortex-M33, and a 5 Gbps SERDES block configurable for PCIe.
  2. The author achieves bare-metal execution entirely within on-die SRAM, skipping external DDR and standard vendor software stacks like U-Boot.
  3. Oscilloscope analysis of the PCIe link revealed an intermittent SERDES PLL lock issue causing data corruption during link training.

who should read it

Embedded systems engineers and hardware hackers interested in low-level SoC bring-up and custom firmware.

discussion positive

consensus

Commenters discuss the rationale behind ST's naming conventions for combining Linux applications processors with microcontrollers, generally agreeing that such hybrid architectures target specific industrial rather than hobbyist use cases.

pushback

Some commenters question whether slapping the STM32 brand name on a high-end MPU dilutes its meaning or makes it unnecessarily confusing.

best comment by zwieback ↗

The idea is to move realtime-ish stuff to a popular processor many people have worked with and moving the Linux stuff over to an appropriate platform.

When it came out we used STM32MP257 to demo a quadrature encoder debugger/logger (for internal use, not a product) since the IO supports easy interfacing of encoders. The micro's peripherals (SPI, I2C, GPIO etc.) are easy to program at the register level and you can run a simple mainloop+interrupts thing on the micro, then run Linux for your UI, networking, etc.

The fact that there's not much activity around these kinds of platforms …

It outlines real-world industrial scenarios where splitting tasks between a real-time core and a Linux core on the same die provides practical value.

Generated by an LLM from the article and thread. Check the sources before relying on it.