esp-rs / std-training

Embedded Rust on Espressif training material.
https://esp-rs.github.io/std-training
Apache License 2.0
590 stars 75 forks source link

Button interrupt on edge fired repeatedly #248

Open Gieneq opened 5 months ago

Gieneq commented 5 months ago

This example: https://github.com/esp-rs/std-training/blob/main/advanced/button-interrupt/examples/solution.rs Copy pased to setup generated from std template on "ESP_IDF_VERSION = "v5.1.3"" uploaded to ESP32C3 M5 stamp. Same effect on Wokwi ESP32C3 std blink example. In both cases I got spammed with button clicked. It looks like instead "on_edge" interrupt I got "on_level".

Also initial debug log is not changing at all. Only indicates used GPIOs with all params set to 0: I (18) gpio: GPIO[9]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 No change after setting input pulls, attaching interrupt or using as output.

dependencies: esp-idf-svc = { version = "0.48", default-features = false } anyhow = "1.0.81"