cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure I2C2 module on STM32F217ZG?

SJaci
Associate

I have managed to communicate via I2C1, but when I switch over to I2C2 I always get a "Busy" response state from the MCU.

Please keep in mind that this is the same I2Cx module from the same datasheet which is set up and executed in the same way as I2C1.

The pins I want to use I2C2 on are PF0 and PF1.

Any sort of help or guidance would be appreciated.

Is there anything from the datasheet I might have overlooked?

Thanks in advance.

1 REPLY 1

You must enable all the clocks used by the sub-component you utilize.

The pin AF mux settings, must reflect the peripheral which you want to use.

Ordering is important, clocks must run before you initialize things that depend on them.

>>Is there anything from the datasheet I might have overlooked?

We don't have a strong frame of reference to know what you've actually implemented/coded. If your presentation of the problem is adequate, guessing is not required.

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