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

Open Drain output for GPIOTE task pin

It appears that when setting a GPIO pin up to be used by the GPIOTE module as an output task the GPIOTE module takes over the configuration of the pin. It does not appear that it is possible to set the pin in Open Drain configuraiton as you can with the GPIO module itself because GPIOTE overrides this as soon as the task is enabled. Is this correct or am I missing something obvious?

Parents Reply Children
  • I am using the GPIOTE channel to configure an output. The nrfx_gpiote_out_config_t strructure does not contain the skip_gpio_setup flag. It only appears to be available in the input configuration structure.

  • Hi,

    Yes, it seem that nrfx_gpiote_out_init() will configure the pin with nrf_gpio_cfg_output() to be NRF_GPIO_PIN_S0S1 (///< Standard '0', standard '1'.)

    You wanted to use one of these other drive modes?

    /** @brief Enumerator used for selecting output drive mode. */
    typedef enum
    {
        NRF_GPIO_PIN_S0S1 = GPIO_PIN_CNF_DRIVE_S0S1, ///< Standard '0', standard '1'.
        NRF_GPIO_PIN_H0S1 = GPIO_PIN_CNF_DRIVE_H0S1, ///< High drive '0', standard '1'.
        NRF_GPIO_PIN_S0H1 = GPIO_PIN_CNF_DRIVE_S0H1, ///< Standard '0', high drive '1'.
        NRF_GPIO_PIN_H0H1 = GPIO_PIN_CNF_DRIVE_H0H1, ///< High drive '0', high drive '1'.
        NRF_GPIO_PIN_D0S1 = GPIO_PIN_CNF_DRIVE_D0S1, ///< Disconnect '0' standard '1'.
        NRF_GPIO_PIN_D0H1 = GPIO_PIN_CNF_DRIVE_D0H1, ///< Disconnect '0', high drive '1'.
        NRF_GPIO_PIN_S0D1 = GPIO_PIN_CNF_DRIVE_S0D1, ///< Standard '0', disconnect '1'.
        NRF_GPIO_PIN_H0D1 = GPIO_PIN_CNF_DRIVE_H0D1, ///< High drive '0', disconnect '1'.

Related