AnsweredAssumed Answered

GPIO configuration for i2c and spi

Question asked by pod.hate on Nov 21, 2011
Latest reply on Nov 22, 2011 by ColdWeather

In principle, i2c and spi interfaces need open drain connections with (data) lines connected to pull-up resistors.

However, in all the sample codes of the STM32 (examples in the peripheral library), the GPIOs for these peripherals are configured as push-pull with (internal) pull-down resistors.

What could be the reason for this choice? Could it be that internal pull-up resistors of STM32 are too big (approximately 40K) to support fast communication?

In case I don't want to use external pull-up resistors for spi and i2c lines, should I prefer using open-drain with pull-up resistor configuration or push-pull with pull-down resistor configuration (as in the examples) for the GPIOs?

Outcomes