2013-03-22 09:47 AM
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-i2c2013-03-22 10:05 AM
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.2013-03-22 02:44 PM
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?2013-03-22 03:29 PM
Yes, input floating, no transistors are driving the pin, no polysilicon resistors conducting to the supplies.
2013-03-23 12:24 PM
OK, many thanks.