This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to disable GPIO pin

Hi,

If I don't configure GPIO pin (for LED), the led is not lit, and it doesn't  draw any current. (16uA).

But If I configured it as output, then disconnect, OR output is 0 (LED not lit), it constantly draws 17uA extra, with total 33uA).

If I configured it as default ( nrf_gpio_cfg_default() ), it also draws ( 17uA extra, with total 33uA) .

My question is how to set GPIO pin back to power-up default as it has not been configured (never used), after it is configured as output?

Thank you,

David Zhou 

Parents
  • Hi David,

    Have you seen the Pin register values, and their configuration following resets?
    The register value following reset is written at the top of each register description.

    It is hard to pinpoint without having seen your code, but the current draw you describe matches that of an enabled pullup resistor.
    Could you ensure that you are not leaving a pullup resistor enabled anywhere?

    Let me know if this identifies your extra current draw, and get back to me if it does not.
    In the case that it does not, please share the code that you are running, so I may take a look.

    Best regards,
    Karl

Reply
  • Hi David,

    Have you seen the Pin register values, and their configuration following resets?
    The register value following reset is written at the top of each register description.

    It is hard to pinpoint without having seen your code, but the current draw you describe matches that of an enabled pullup resistor.
    Could you ensure that you are not leaving a pullup resistor enabled anywhere?

    Let me know if this identifies your extra current draw, and get back to me if it does not.
    In the case that it does not, please share the code that you are running, so I may take a look.

    Best regards,
    Karl

Children
No Data
Related