AnsweredAssumed Answered

Is there any known issue with I2C1 on STM32F7 Discovery board?

Question asked by David Harrison on Jan 7, 2017
Latest reply on Jun 9, 2017 by David Harrison

Hi all. I have an STM32F746G-DISCO discovery board (chip is STM32F746NGH6).

I am writing an I2C master driver for the I2C1 peripheral using pins PB8/9. These are the I2C SCL/SDA lines brought out to the Arduino header, the external I2C connector and the DCMI camera port. It is only partially working. I can initialize I2C1 OK, but when I try to write to an external register in the slave device, It just will not send out the correct data on the bus. it will correctly send out the slave device address after the start bit which is acknowleged correctly by the slave, but then follows a single byte of rubbish instead of the slave's register address and the data byte to write into it.

 

In the F7 series, the I2C peripheral registers are quite different from those in the F4 series but are the same, or I think they are, as those in the F3 series. I have both the F3 and the F4 Discovery Board and have successfully implmented a working I2C driver in both of them, both giving the same desired bus activity.


So given the F3 I2C registers are the same as the F7 I copied the exact same code for I2C initialization and the ICWriteByte function from the F3 Discovery demonstration source code, which I have proven to work with my external I2C slave device, to the F7 disco board, but it just won't write out the correct data to the bus.

 

Are there any known issues with the I2C1 peripheral on either the STM32F746NGH6 chip or the F7 DISCO board?

 

I have attached images of the correct bus behaviour, recorded from the F3 board, and the incorrect bus behaviour, as well as the source code.


Can anyone help me out please?

 

Outcomes