This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF52810 Open Drain GPIO

In the recent past, I used a SoC in which GPIOs could be configured as "open drain", that is in which there is an internal transistor where the SOURCE is grounded, the DRAIN is left open (the exposed GPIO pin) and the GATE can be controlled internally.

In that configuration, I connected a sensor VCC to the battery and sensor GND to the open-drain GPIO. Then, I could switch the GPIO status programmatically between "disconnected" and low (grounded) and so power on and off the sensor without adding an external transistor.

I can't find an explicit "open drain" configuration for nRF52810 GPIOs, is there a way to do this?

  • Hello Gilsaccio

    The closest you get is by configuring the pin to disconnect on logic high, and either be standard or high drive for logic low. This will give the same behavior. In this case, when you set the output level to 1, the pin will go high-Z. When you configure the output to be logic low, the pin will go low and sink current. You can see this explained in this post. However there is a limitation as to how much current you can sink this way, and how high the voltage applied to the pins can be. You can find the absolute maximum rating section here and the electrical specifications for the GPIO here.

    Depending on how the sensor behaves when current stops running, the pin voltage, when high-Z, may float up to VCC. Be sure then that does not surpass the absolute maximum rating.

    Best regards

    Jørn Frøysa

  • If you look at the config register settings for the gpio, most pins allow for many settings of RW DRIVE. Quasi open drain or quasi open source are when the corresponding bit status shows "Disconnect". eg, S0D1 is standard open drain with the pull up off for "1".

    It should be noted that for anything with a CMOS implementation you cannot pull the gpio higher than Vdd_nRF by Vgs threshold. When this happens the pull up will turn on no matter the state of the register. This is the reason for the max voltage being Vdd+0.3V

  • Sorry I answered too. I think I was looking up the register names when you had already answered it.

  • Nothing to be sorry about, the more the merrier :)

  • Thank you guys for your prompt and thorough answers, that was exactly what I was looking for. Amazing!

Related