Skip to content

gpio: GPIO_DT_ACTIVE_LOW in dt_flags prevents the pin from driving #20

Open

Description

@swoisz

Setting GPIO_DT_ACTIVE_LOW in gpio_dt_spec.dt_flags causes the pin to stop driving entirely (observed on ESP32-C5, 2026-05-08). gpio_pin_configure_dt correctly masks out the ACTIVE_LOW bit before calling gpio_config, so configuration should work — but in practice the pin produces no output.

Workaround: use dt_flags = 0 and handle polarity manually.

Needs investigation in gpio_dt.c / gpio_esp32_pin_configure — suspect the logical-level XOR path or the output-init flag resolution interacting badly with the active-low bit (cf. the upstream-aligned init-level handling added in #14).

Activity

  1. added
    bug
    on Jun 6, 2026
  2. swoisz commented on Oct 29, 2026

    @swoisz
    CollaboratorAuthor

    Needs re-triage against current code. GPIO_DT_ACTIVE_LOW no longer exists: it was renamed to upstream's GPIO_ACTIVE_LOW (BIT(0), matching upstream) in #14, and #52 added GPIO_ACTIVE_HIGH. The active-low paths are now gpio_dt.h:126 (configure masks the bit), :136/:149 (output init and set invert) and :164 (get inverts).

    Next step: re-test on hardware with .dt_flags = GPIO_ACTIVE_LOW and gpio_pin_configure_dt(&spec, GPIO_OUTPUT_ACTIVE), then close or update with a fresh repro. Related, but a different bug: #86 (GPIO_OPEN_DRAIN silently push-pull; interrupt flag bits differ from upstream).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions