You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to use GPIOTE on the nrf dongle for catching a button interrupt (p1.06) and changing the state of the led (p0.06) the nrf dongle got stuck. Other pin combinations worked.
Steps to Reproduce
#![no_main]
#![no_std]
use nrf52840_hal as hal;
use hal::gpio::{p0, p1};
use hal::gpio::Level;
use hal::gpiote::Gpiote;
use hal::prelude::*;
use core::panic::PanicInfo;
use cortex_m::asm;
#[cortex_m_rt::entry]
fn main() -> ! {
let p = hal::pac::Peripherals::take().unwrap();
let port0 = p0::Parts::new(p.P0);
let port1 = p1::Parts::new(p.P1);
let mut led = port0.p0_06.into_push_pull_output(Level::Low).degrade();
let button = port1.p1_06.into_pullup_input().degrade();
let gpiote = Gpiote::new(p.GPIOTE);
gpiote
.channel0()
.input_pin(&button)
.hi_to_lo()
.enable_interrupt();
led.set_low().unwrap();
loop {
continue;
}
}
#[panic_handler]
fn panic(_: &PanicInfo) -> ! {
loop {
continue;
}
}
nrf-hal/nrf-hal-common/src/gpiote.rs
Line 260 in 4f41e48
Summary
Trying to use GPIOTE on the nrf dongle for catching a button interrupt (p1.06) and changing the state of the led (p0.06) the nrf dongle got stuck. Other pin combinations worked.
Steps to Reproduce
Additional Debug Information
According to @Dirbaio there is a bug in
gpiote.rs
L260 (https://github.com/nrf-rs/nrf-hal/blob/master/nrf-hal-common/src/gpiote.rs#L260) where only the pin but not the port is being set.The text was updated successfully, but these errors were encountered: