cancel
Showing results for 
Search instead for 
Did you mean: 

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

anonymous.8
Senior II
Posted on January 07, 2017 at 20:16

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?
5 REPLIES 5
anonymous.8
Senior II
Posted on January 07, 2017 at 21:19

A quick update. I've just switched to I2C3 on pins PH7/8 and the very same code works there. So the question is - what is wrong with I2C1 on pins PB8/9?

sachin joy
Associate
Posted on June 06, 2017 at 13:02

Did you find out what happened ??

Posted on June 06, 2017 at 15:47

Nope, I just switched to I2C3 and its still working. Too much trouble to find out what was wrong with I2C1.

Amel NASRI
ST Employee
Posted on June 07, 2017 at 11:03

Hi

Harrison.David.002

‌,

Are there any known issues with the I2C1 peripheral on either the

STM32F746NGH6 chip or the F7 DISCO board?

I2C1 is selected to be used in the I2C examples implemented in the STM32CubeF7 package for STM32F746G-Discovery.

So there are no issues with the peripheral.

I recommend you to test one of these examples to confirm it (PB8/9 are used as well).

You find them under [STM32Cube_FW_F7_V1.7.0]\Projects\STM32746G-Discovery\Examples\I2C.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Posted on June 09, 2017 at 21:15

I don't know what my original problem was, but it is gone now. I can now use I2C1 on PB8, PB9 with no problem.