0
\$\begingroup\$

I'm doing a project on stm32f407. I want to configure one of the GPIOs to the timer6 of stm32f407. Which output mode (push-pull mode or open drain mode) of GPIO is most suitable to configure the timer6? It would be really helpful to know why that mode is most suitable for the same too.

\$\endgroup\$
  • \$\begingroup\$ What timer mode will you use? PWM, Input Capture, Encoder, etc.? \$\endgroup\$ – Bence Kaulics Jun 21 '17 at 10:57
  • 1
    \$\begingroup\$ Timer module doesn't depend on the output mode. It is all about your circuit outside. \$\endgroup\$ – Ayhan Jun 21 '17 at 11:35
  • \$\begingroup\$ PWM @BenceKaulics \$\endgroup\$ – Harshita Nadig Jun 22 '17 at 3:31
1
\$\begingroup\$

As Ayhan says, the output mode used relates to the external circuit that you are driving, and is essentially independent of the signal source - whether it is a timer or something else.

Pushpull mode is probably the more useful if you had to choose one. In pushpull mode the load is actively driven high or driven low.
If you are driving a resistive load, a logic input or most other loads, push pull will usually work.

Open-drain mode is used to drive high connected loads.
Then the output is "low" the pin drive MOSFET is on and the load current is "sunk" to ground. When the output is high the pin is pulled high by the high connected load. The pin rise time will usually be slower than when a push-pull drive mode is chosen as the drive current via the load has to charge the stray and port capacitance via the load.
Open collector is useful in allowing combining of two OC pins. If both are high the output is high. If either is low the output is also low. If both are high the output is high.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.