Census
STM32 I2C Scanner Exercise
Task
Once after reset, print every address a bench device answers on I2C1. The registers and bit fields are on the Datasheet tab.
Circuit
Pass condition
One line per device, 0x and two uppercase hex digits, in address order, then DONE: and the count. The bus is free when the scan ends.
Notes
The given code brings up USART1 and I2C1, clock included. uart_puts, uart_hex and uart_dec print. Other cases fit other devices, or none.