2023-08-19 05:25 AM
para aplicar i2c alternate function open-drain GPIO_InitStruct.Pull = GPIO_PULLDOWN o should be GPIO_PULLUP (what diferencetween both) and uart alternate function push-pull should be pull-up or pull-down what diferencetween both?
Solved! Go to Solution.
2023-08-19 07:32 AM
In general, I2C should be pulled up by an external resistor and the pin should be configured as AF open-drain without a pullup or pulldown. The internal pullup is not strong enough. Configuring it with a pullup doesn't hurt anything but isn't necessary if the external pullup is there.
In general, UART should also have an external pullup as the internal pullup is weak, but using the internal pullup will work with lower data rates. Pins should be configured as AF push-pull.
Neither I2C or UART should use a pulldown.
2023-08-19 07:32 AM
In general, I2C should be pulled up by an external resistor and the pin should be configured as AF open-drain without a pullup or pulldown. The internal pullup is not strong enough. Configuring it with a pullup doesn't hurt anything but isn't necessary if the external pullup is there.
In general, UART should also have an external pullup as the internal pullup is weak, but using the internal pullup will work with lower data rates. Pins should be configured as AF push-pull.
Neither I2C or UART should use a pulldown.