Skip to main content
andrew liu
Associate
November 22, 2020
Question

About the I2C of STM32F030C8; from the datasheet, PIN 42/43, 45/46, They all could be I2C1; pin 21/22 or 35/36, which is I2C2?

  • November 22, 2020
  • 2 replies
  • 1909 views

please review the datasheet,--4 Pinouts and pin descriptions--

from the datasheet, both PIN 42/43 and 45/46 could be I2C1;

both PIN 21/22 and 35/36 could be I2C2;

which is right exactly?

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
November 22, 2020

Whichever you chose, by setting the respective bits in GPIOx_AFR for given pin (while setting given pin to AF in GPIOx_MODER).

JW

andrew liu
Associate
November 23, 2020

Hello Waclawek:

Thanks for you answer;

But for STM32F030C8, it just has two I2C port? I2C1 and I2C2?

thanks;

Tesla DeLorean
Guru
November 23, 2020

You make this overly complicated,

You get to pick one SCL and SDA pin for each I2C1 and I2C2

The choices are constrained by the AF mappings

I2C1_SDA 43 OR 46, PICK ONE

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