Input/Output

pinSetDriveStrength()

pinSetDriveStrength

Since 2.0.0:

// PROTOTYPE
int pinSetDriveStrength(pin_t pin, DriveStrength drive);

Sets the pin drive strength on Gen 3 devices with Device OS 2.0.0 and later.

DriveStrength is one of:

  • DriveStrength::DEFAULT (STANDARD)
  • DriveStrength::STANDARD
  • DriveStrength::HIGH

Returns SYSTEM_ERROR_NONE (0) on success, or a non-zero system error code on error.

The drive strength is typically 2 mA in standard drive mode (the default), and 9 mA in high drive mode.

Parameter Symbol Conditions Min Typ Max Unit
Current at GND+0.4 V, output set low, high drive IOL,HDL V3V3 >= 2.7V 6 10 15 mA
Current at V3V3-0.4 V, output set high, high drive IOH,HDH V3V3 >= 2.7V 6 9 14 mA
Current at GND+0.4 V, output set low, standard drive IOL,SD V3V3 >= 2.7V 1 2 4 mA
Current at V3V3-0.4 V, output set high, standard drive IOH,SD V3V3 >= 2.7V 1 2 4 mA

Gen 3 Devices (B Series SoM, Tracker SoM, Tracker One, Boron, Argon, and E404X):

  • Pin drive strength setting is only available on Gen 3 devices (nRF52840).
  • On the P2 and Photon 2, the pin drive strength is always 16 mA.
  • On Gen 2 devices (Photon, P1, Electron, and E Series) the pin drive strength is always 25 mA.