2012-05-06 12:16 PM
Hi
I've seen quite a few UART examples, and all of them set the RX GPIO pin as ''Input-floating''.Why is it not set to ''Push-Pull'' (which can sink and source current)? The Tx pin is set to push-pull. What is the difference?Thanks in advanceAmir #stm32-gpio-mode2012-05-06 12:29 PM
I've also seen SPI examples and the SPI GPIO pins are set to push-pull.
Why would UART and SPI be different?2012-05-06 07:17 PM
You are mixing Input mode and Output mode of IO.
The Transmission pin of the MCU needs to be in PP out and Receiving pin has to be in Input Floating mode to let the Tranmitting pin drive the Rx pin of the MCU2012-05-07 07:41 AM
''UART examples, and all of them set the RX GPIO pin as 'Input-floating'.''
The clue is in the name: Input.''Why is it not set to 'Push-Pull'?'' An Input receives a signal driven by some other device; Push-Pull is for use as an output to drive another device!''The Tx pin is set to push-pull'' Yes - because Tx is an output, so it needs to drive another device! This is general - apart from the particular names, it is not specific to the STM32.