‎2022-03-23 09:35 AM
AN2606, page 268, for STM32H7B3I I2C bootloader, says "Slave 7-bit address: 0b10101111x
(where x = 0 for write and x = 1 for read)".
Unfortunately, "10101111" is eight not seven bits.
I have two STM32H7B3I EVAL systems successfully communicating via I2C, 7-bit addressing, where each device is identified by a 7-bit value which is left shifted one bit before calling HAL_I2C_Master_***_IT functions.
AN4221, which details the I2C slave bootloader protocol, says "The I2C slave address for each product bootloader is specified in the AN2606".
What is the correct 7-bit address to use?
Solved! Go to Solution.
‎2022-03-23 02:05 PM
Primary you need use concrete pins , cant alternate, for example I2C1 only on PB6 PB9
‎2022-03-23 12:36 PM
You can probably try quicker than you'll get an official answer..
Could also disassemble the loader.
Likely (0xAE, 0x57 << 1)
0b1010111x
What version? 53 is what's up today, pg 274
‎2022-03-23 12:53 PM
Well, prior to your suggestion, I had tried both 0xAF and 0xAE, and regrettably both timed out, i.e., HAL_I2C_Master_Transmit_IT was "successful" but never resulted in a transmit complete callback.
Thus I infer that the I2C slave, powered up with SW1=ON, did not choose to accept data at 0xAF or 0xAE.
Am presently connecting a logic analyzer to the I2C signals to document what is happening.
‎2022-03-23 02:05 PM
Primary you need use concrete pins , cant alternate, for example I2C1 only on PB6 PB9
‎2022-03-23 02:59 PM
I'm afraid you've found my problem.
My I2C slave is using I2C1 with SCL at PB8, and with SDA at PB9.
But AN2606 says I2C1 must use SCL at PB6, and with SDA at PB9.
Therefore, the I2C1 bootloader doesn't see the clock signal.
Now must get my hardware guy to rewire.
Thanks.
‎2022-03-24 08:44 AM
8) Dont worry , im afraid , that you mark own reply as best 8)
‎2022-03-24 09:51 AM
Pleased to report all is well, thanks to your suggestion.
Rewired I2C SCL from PB8 to PB6.
Made same change in CubeMX.
Verified both EVAL boards could still communicate via I2C.
Then cut power to slave EVAL, set SW1=1, restored power, and master EVAL was able to successfully perform Get Version command with slave EVAL, got ACK, got version byte [0x12], got another ACK.
BTW, used 0x57 << 1 = 0xAE for I2C address.
Many thanks for your help!
‎2022-03-24 10:00 AM
Im happy , that my crystal ball integrated with Murphy laws helping you. :beaming_face_with_smiling_eyes: