cancel
Showing results for 
Search instead for 
Did you mean: 

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?

andrew liu
Associate II

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?

3 REPLIES 3

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 II

Hello Waclawek:

Thanks for you answer;

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

thanks;

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 Venmo
Up vote any posts that you find helpful, it shows what's working..