cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103RB need to connect I2C-2 with conflicting pins

medhayo
Associate II
Posted on March 22, 2013 at 17:47

I have a requirement to connect an STM32F103RB to existing equipment which is designed for interfacing with another microcontroller, with some intrinsic incompatibilities in the connection lines. I would like to know if it is possible to set pins PC4 and PC5 on STM32F103RB (LQFP64 pins 24 and 25) to a high impedance state, and short these pins to the I2C-2 port on PB10 and PB11 (LQFP64 pins 29 and 30). With these pins shorted together would it be possible to use the I2C-2 port without interference from the PC4 and PC5 ports? Or alternatively if I set pins PC4 and PC5 to input-floating mode, again with these pins hardware shorted to I2C2_SCL and I2C2_SDA, would the I2C2 port work OK? I do not need to do anything else on PC4 and PC5, the problem is that the existing equipment has the I2C port on the lines where PC4 and PC5 have to connect. The hardware is using 3.3V,  and 100kHz or 400kHz.

The only alternative would be to build a special interface between the two devices, which is not desired. Many thanks in advance for some input.

#stm32f103rb-i2c
4 REPLIES 4
Posted on March 22, 2013 at 18:05

Not sure I buy the story, what microcontoller otherwise has near identical pinning?

You could also cut off the pins you don't want to contact, but yes you could tristate the pins, and yes you could connect other functions to the traces. You could also emulate I2C via bit banging on any GPIO pins you wanted too.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
medhayo
Associate II
Posted on March 22, 2013 at 22:44

You don't need to buy it!

Sorry if I didn't make myself clear, but both microprocessors are on finished boards, with terminals that are designed to be somewhat compatible. The I2C port unfortunately doesn't fit into the somewhat, and the equipment it connects to needs that.

Thanks for your answer. I thought it ought to be possible to put the pins into a tristate, but the reference manual for the STM32F10xxx does not mention tristate. If I configure as input floating mode is that tristate?

Posted on March 22, 2013 at 23:29

Yes, input floating, no transistors are driving the pin, no polysilicon resistors conducting to the supplies.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
medhayo
Associate II
Posted on March 23, 2013 at 20:24

OK, many thanks.