cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F427 I2C Master Transmit - Restart - Issue

Joe.H
Associate III

I am trying to modify my own I2C driver (I don't use Cube) - to talk to a BQ32000 device - it's a I2C RTC chip.

The protocol is shown in the picture below.

The protocol to read requires a "restart" after sending the chip's address and sub-address to establish a new "Read Address".

I am trapping the I2C status register to determine which event flags are being sent.

I am capturing the complete I2C stream with a logic analyzer.

When I issue a "restart" (I set the I2C_CR1_START in CR1) - the logic analyzer is showing a new "start bit" being generated but the I2C device does not place the restart address on the bus. In fact, the I2C device will only transmit a stop bit after the restart.

Reading RM0090 (users manual) - the only place it talks about issuing a restart is when addressing "Master Receive" mode - no mention of restart from "Master Transmit" mode.

As a side not, once the restart if activated (set the I2C_CR1_START in CR1) I would expect a SB event followed by an Address event -- neither are issued.

Can someone explain how to generate a restart from Master Transmit mode?

Thanks.

Joe

1 REPLY 1
Joe.H
Associate III

I do not believe the STM32F4 can properly generate a restart under the conditions I described.

Contrary to the protocol stated for the device, I broke the I2C communications into a Write Block followed by a Read Block where each block was terminated with a STOP bit.

The device properly replies so this question can be closed.