Skip to main content
VShah.4
Associate
March 22, 2022
Solved

How much minimum current needed on any GPIO pin for driving it?

  • March 22, 2022
  • 11 replies
  • 8295 views

..

    This topic has been closed for replies.
    Best answer by Paul1

    Given these are FET inputs the input current is negligible for standard GPIO pins, i.e. a 100Kohm pullup or pulldown can easily drive an STM32 GPIO input. -but- if you are hitting the pin with a high frequency digital signal, then you'll need to charge the pin's input capacitance pass the Hi/Lo voltage threshold before the new state is detected (i.e. lower resistance at higher speed data). Also if driving an analog input then you need to charge the sampling capacitor fully to the input voltage, which means a low impedance input source for higher frequency signals/sampling.

    The input voltage for Hi/Lo will depend on the Vcc supplied to the IC, expect for 5V compatible pins. Check the MCU's datasheet for the specific GPIO pin's input threshold.

    Paul

    11 replies

    KaushikThumar
    Visitor II
    March 22, 2022

    0693W00000KdVn2QAF.pngNot sure about Minimum Current, but as per STM datasheet the maximum current rang is up to 25mA. you can see it in the datasheet page 58, Arm® Cortex®-M4 32b MCU+FPU, 105 DMIPS, 256KB Flash/64KB RAM, 11 TIMs, 1 ADC, 11 comm. interfaces (st.com). I search it, and assume it ranges from some uA to 25mA.

    VShah.4
    VShah.4Author
    Associate
    March 22, 2022

    Okay Thanks.

    But it would be great if someone can help with precise value of minimum current!!

    Peter BENSCH
    ST Technical Moderator
    March 22, 2022

    Does your question refer to the fact that you want to drive a GPIO pin as an input and know the minimum current for it?

    Or are you asking about the minimum current that a GPIO can drive into a connected load?

    Regards

    /Peter

    In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
    Paul1
    Paul1Best answer
    Senior III
    March 22, 2022

    Given these are FET inputs the input current is negligible for standard GPIO pins, i.e. a 100Kohm pullup or pulldown can easily drive an STM32 GPIO input. -but- if you are hitting the pin with a high frequency digital signal, then you'll need to charge the pin's input capacitance pass the Hi/Lo voltage threshold before the new state is detected (i.e. lower resistance at higher speed data). Also if driving an analog input then you need to charge the sampling capacitor fully to the input voltage, which means a low impedance input source for higher frequency signals/sampling.

    The input voltage for Hi/Lo will depend on the Vcc supplied to the IC, expect for 5V compatible pins. Check the MCU's datasheet for the specific GPIO pin's input threshold.

    Paul

    VShah.4
    VShah.4Author
    Associate
    March 22, 2022

    Thanks Paul.

    It would be great if you can tell me about that specific value of input current(negligible as mentioned), or any method to find it.

    Paul1
    Senior III
    March 23, 2022

    Impossible to answer, insufficient info.

    • Exact part number, full length, all digits
    • Exactly which pin number (some have different specs, like 5V tolerant pins)
    • Details of input signal? Hi/Lo voltage, Frequency, impedance? Desired response time?

    I suspect you are making this harder than it actually is. If you are just monitoring a button, then wire button to Gnd, and use an internal or external pullup resistor, KISS.

    Get a low cost demo board (Nucleo) andf a bread board, wire up your input, and put a scope on it so you can see what the input signal looks like.

    Do you understand that a GPIO input is basically just the pin connected to the gates of a pair of FETs? (CMOS, plus some ESD diodes). The actual input the FETs' gate capacitance that needs to be charged (pF), not a resistive load that needs continuous drive current.

    If you are a beginner, then consider looking at:

    Paul

    Tesla DeLorean
    Guru
    March 22, 2022

    Perhaps provide some specific context, part number and scenario, it's hard to decipher exactly what you're really in looking for and how this will effect the currents and voltages involved.

    Remember this is a technical venue so avoid being vague or ambiguous.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    VShah.4
    VShah.4Author
    Associate
    March 22, 2022

    I want to know regarding STM32F401 GPIO pin. How much minimum current will be required to drive the pin as input?