2019-01-22 01:12 AM
2019-01-22 04:01 PM
For scanning you can use the HAL library function HAL_I2C_IsDeviceReady.
This function sends start, then the specified device address and checks for ACK. Then it sends stop.
The device address for it can have the read bit (LSB) set or clear, in case the device you scan for reacts to read and write accesses differently.
-- pa
2019-01-22 10:11 PM
> This function sends start, then the specified device address and checks for ACK. Then it sends stop.
Or so, without Cube.
I'm not aware of any such scanner program for STM32, but it's straightforward to code.
Just address every non-broadcast I2C address, and check for an ACK.