Electronic – What use is a pull-up/pull-down with a push-pull output

pulluppush-pullstm32stm32f4

For at least some STM32F4 MCUs, push-pull + pull-up/pull-down is a valid GPIO configuration, but what would you ever use it for, and why? I assume there's some saner reason than "I just really felt I needed that juicy extra 100µA of wasted current per pin"…

The configuration is listed in section 8.3 of the reference manual, on page 269:
enter image description here
enter image description here

Best Answer

Basically the chart shows that the PUPDR bits control the pull-up and pull-down connections independent of the OTYPER bit that switches between push-pull and open drain.

Probably you would not typically set PUPDR to anything but 00 when using the push-pull configuration.

One situation where you might do so is if you were going to switch the pin between output and input functions. You might want the pull-up or pull-down to be configured before you switch to input mode to avoid the input ever being in a truly floating state.