cancel
Showing results for 
Search instead for 
Did you mean: 

What I2C device address to use for STM32 slave bootloader?

FrankNatoli
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions

Primary you need use concrete pins , cant alternate, for example I2C1 only on PB6 PB9

View solution in original post

7 REPLIES 7

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

https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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.

Primary you need use concrete pins , cant alternate, for example I2C1 only on PB6 PB9

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.

8) Dont worry , im afraid , that you mark own reply as best 8)

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!

Im happy , that my crystal ball integrated with Murphy laws helping you. :beaming_face_with_smiling_eyes: