// application note
AN0002 Programming STM32 microcontrollers over I2C with the Binho Pulsar
The system bootloader programmed into the ROM of STM32 microcontrollers offers an I2C interface on most families, allowing internal flash memory to be erased, programmed and verified over two wires with no debug probe attached. This application note describes that interface, the connections required between a Binho Pulsar USB host adapter and the target, and the procedure for programming a device. The same procedure and the same utility work with a Binho Supernova. A complete reference utility written in Python accompanies the document. Measured results are given for an STM32H503 on a NUCLEO-H503RB board.
- Products
- Binho SupernovaBinho Pulsar
- Protocols
- I2C
- Topics
- STM32 Bootloader Flashing
- Revision
- Rev 1.1 · September 3, 2026
// outcomes
What you'll walk away with
This document describes:
- the structure of the I2C system bootloader protocol, including the mechanism used to report command status and the mechanism used to signal that the target is busy
- the connections required between a Binho Pulsar and an STM32 target
- the procedure for identifying, erasing, programming and verifying a device
- a method for confirming from outside the programming tool that the target is running the newly programmed image
- the accompanying reference utility, which drives either a Pulsar or a Supernova
It does not cover programming over UART, USB, SPI, CAN or I3C; option-byte programming; readout protection, which the ROM bootloader on the tested part does not offer over this interface; or production programming fixtures. For I3C on the STM32H5 series, see AN0001.
// background
Background
The system bootloader programmed into the ROM of every STM32 microcontroller provides a means of programming internal flash memory over a serial interface, without a debug probe and without any user code present on the device. The interfaces offered by the bootloader vary by device and are listed per part number in AN2606.
I2C appears on that list for most STM32 families, which makes it the broadest of the in-system programming options. Where a board already routes an I2C bus to reach sensors, EEPROMs or a power-management device, the same two wires can carry a firmware update, and no dedicated programming header is required. Where a product is already manufactured in volume, an I2C bus is usually present somewhere on the board whether or not it was planned for programming.
This note is the I2C counterpart to AN0001, which covers the I3C interface on the STM32H5 series. The command set is nearly the same on both. What differs is how the target reports status and how it says it is busy, and those differences shape the host code more than the command list does.
// applicable devices
Applicable devices
The I2C system bootloader is not specific to one family. The pins it uses and the address it answers on differ per part, and both are given in AN2606 for every device that offers the interface. Neither is guessable, and neither is consistent across families.
| Family | Example part | Bootloader I2C interface | Basis |
|---|---|---|---|
| STM32H5 | STM32H503 | I2C2, PB3/PB4, address 0x67 |
Tested for this document |
| STM32H5 | STM32H563 | Per AN2606 | AN2606, not tested |
| STM32G0, G4 | none | Per AN2606 | AN2606, not tested |
| STM32L4, L5 | none | Per AN2606 | AN2606, not tested |
| STM32U5 | none | Per AN2606 | AN2606, not tested |
Only the STM32H503 row was exercised on hardware. The other rows record that AN2606 lists an I2C interface for those families; the pins, the address and the supported command list must be read from AN2606 for the part in hand before any of this document's commands are issued.
// what's covered
What's covered in the note
- 01 Introduction
- 02 System overview
- 03 Hardware setup
- 04 Software setup
- 05 Bootloader protocol
- 06 Programming procedure
- 07 Confirming the update on the target
- 08 Reference utility
- 09 Measured results
- 10 Troubleshooting
The full procedure, measured results, and reference code are in the PDF and the assets archive.
// materials
What you'll need
Binho Supernova USB host adapter for I3C, I2C, SPI & UART View product
Binho Pulsar USB host adapter for I2C, SPI, UART, GPIO & CAN-FD View product // trusted by engineering teams at
+ hundreds more
// related notes
Related Application Notes
// newsletter
Get new application notes
New notes, firmware releases, and tool updates from Binho. No spam, unsubscribe anytime.
Put it on the bench
Every step in AN0002 was run on Binho Supernova and Binho Pulsar. Get the hardware to reproduce it, or talk to our engineers about your I2C bring-up.