2

I'm using the Bluepill STM32F103C8T6.

Is it possible to configure the GPIO in such a way that the I2C can be enabled on other pins than:

  • PB6,7,8,9 for I2C1
  • PB10,11 for I2C2
Tarick Welling
  • 3,119
  • 3
  • 19
  • 44
shivani
  • 23
  • 4
  • Are you asking someone to look-up the reference manual /data sheet for you, or are they somehow unclear to you? https://www.st.com/resource/en/reference_manual/cd00171190-stm32f101xx-stm32f102xx-stm32f103xx-stm32f105xx-and-stm32f107xx-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf §9.3.9 and https://www.st.com/resource/en/datasheet/cd00161566.pdf §Table 5 – Clifford Dec 25 '20 at 13:00

1 Answers1

2

No it is not possible to do hardware I2C on other ports than the ones you named on the STM32F103C8T6. The hardware is only routed to those GPIO ports.

You can write a software I2C driver which can be used on any open-collector or open-drain GPIO pin. Best thing to do for that is to look at the Arduino software I2C implementation.

Tarick Welling
  • 3,119
  • 3
  • 19
  • 44