cancel
Showing results for 
Search instead for 
Did you mean: 

Can the I2C2 block be used on STM32F107?

Daniel Näslund
Associate

We're investigating replacing some STM32F105 processors with STM32F107 on a short time frame.

The datasheet footnote says "SPI2/I2S2 and I2C2 are not available when the Ethernet is being used."

Does that mean that I2C2 is never available or that you have to configure some Alternate Function in a certain way to have it enabled.

(From CubeMX I can only select I2C1 for a stm32f107 project. So I guess that's an indication that I2C2 is not available.)

This question has been asked before in 2019 but did not receive an answer back then. https://community.st.com/s/question/0D50X0000B43DcN/stm32f107-i2c2-not-clocking-the-scl-line

3 REPLIES 3
Mike_ST
ST Employee

Hello,

I2C2 is never available (no alternate configuration available).

F107 has only I2C1 available because of Ethernet, and as you found it, cubeMX only shows I2C1.

F105 has I2C2 but no Ethernet.

Daniel Näslund
Associate

Hi Mike and thank you for your swift reply.

[ Sorry for not providing more information below. Due to Covid-19, I'm not in the office and can't make more hands-on experiments. I'll update this post or post follow-ups when I have more information. ]

So today a colleague received a handful of F107 processors.

  • On a board he replaced one F105 with an F107.
  • He loaded the same software as we would use on an F105 onto the F107.
  • He traced the i2c-traffic from PB10 and PB11 and saw that there was activity.
  • The program could successfully retrieve an identity number from an i2c device connected to PB10 and PB11.
  • He did change the id number by altering pull-ups resistors on the i2c device and got back the expected readings. So i2c traffic does work.

He tried to identify the F107 using stlink and got the reply

08:11:34 : Device ID:0x418

08:11:34 : Device flash Size : 256KBytes

08:11:34 : Device family :STM32F10xx Connectivity Line

Questions

  • AFAICT, PB10 and PB11 are connected to I2C2 which should not be available on F107. Correct?
  • Is there a way to determine if we in fact have F107 units in our hands? From reading refmanual section 31.6.1 it seems like stlink uses DBGMCU_IDCODE and that it reports 0x418 for all connectivity devices (F107 and F105). Is there some other means for identifying what chip we have?
  • Is there by any chance so that I2C2 is still available on an F107 even if the ref manual says it won't be there?

Mike_ST
ST Employee

Hello,

All I can say is that F107 is marketed as having only 1 I2C:

https://www.st.com/en/microcontrollers-microprocessors/stm32f105-107.html#products