Skip to content

Waiting for levels on pins results in "GPIO isr service already installed" error #537

@jothan

Description

@jothan

Bug description

Link to the relevant code

  • Would you like to work on a fix? [y/n]
    Potentially, if I understand the issue better.

To Reproduce

From the same thread, I am trying to watch multiple levels on pins concurrently using the async gpio API wait_for_low() and wait_for_high().

I then get an error on one of the two calls and this is printed in the log:

I (11527) gpio: GPIO[4]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (11531) gpio: GPIO[2]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
E (11541) gpio: gpio_install_isr_service(502): GPIO isr service already installed
W (11549) automato_camera_ted::bme280: No BME280 found (Bus(Gpio(GpioError { kind: Other, cause: ESP_ERR_INVALID_STATE (error code 259) }))), continuing without it.

Pins 2 and 4 are the pins I am bit-banging I2C on.

Expected behavior

I should be able to watch for two levels at once from the same thread.

Environment

  • Crate (esp-idf-hal) version: 0.45.2
  • ESP-IDF branch or tag: 5.3.2
  • Target device (MCU): esp32
  • Debian Trixie

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions