cancel
Showing results for 
Search instead for 
Did you mean: 

I2C IAP on STM32F411 Failed

TDai.1
Associate

Hi, Dear:

In our project, we need use STM32F411ve to update firmware image by I2C at bootloader mode.

When the chip enter bootloader mode, at first we use a USB cable to connect PC and F411, STM32CubeProgrammer can download the firmware image to the chip flash and run normally. It's used to make sure the chip in bootloader mode.

But we need to download firmware image by I2C interface, so we pull out USB cable, make the chip in bootloader mode, and connect F411 with an I2C Master device. 

We connect a oscilloscope to monitor SCLK and SDA line signal.

F411 I2C device address is 0x72.

As AN4221 specify, Master device send a Get version command [data: 0x72 0x01 0xFE], in the oscilloscope, SCLK line display the good shape of CLK (400KHz), SDA line display the right graph of data:

Start + 0x72 (8 bits) + ack (1 bit) + 0x01(8bits) + ack (1 bit) + 0xFE(8 bits) + ack (1 bit) + stop (1 bit)

But F411 has no any response later: As AN4221 specify, it should reply ACK (0x79) + Version (8 bits) + ACK (0x79) Or NACK (0x1F).

I also tried other command, as 0x72 + cmd + XOR, got the same result: F411 didn't reply other information.

When change the slave address to 0x73, still no response;

If send the slave address (0x72) at first, and delay some time (such as 20ms), then send command (such as 0x01 0xFE), the oscilloscope SDA line dispay nack reply for the command data, will be:

   start + 0x01(8 bits) + nack ( 1 bit) + 0xFE (8 bits) + nack ( 1 bit) + stop ( 1 bit)

We changed the CLK to 100KHz, and got the same result.

What's the cause? pls help.

Thanks.

Tony

0 REPLIES 0