UART `write` on nrf52840 blocks
1c3t3a opened this issue · 1 comments
1c3t3a commented
Hellođź‘‹ I am currently trying to use the UART connection on the nrf52840-dongle. I try to do UART over the pins 0_15 and 0_20, but I am struggling as the UART write function hangs forever on waiting till the transmission is finished. The board is set up and also has an allocator configured at the point of sending via UART. This is the loop where my program hangs:
nrf-hal/nrf-hal-common/src/uarte.rs
Lines 186 to 188 in f99d937
My code for setting up the connection looks like this:
let p = pac::Peripherals::take().unwrap();
let (uart0, cdc_pins) = {
let p0 = gpio::p0::Parts::new(p.P0);
(
p.UARTE0,
uarte::Pins {
txd: p0.p0_15.into_push_pull_output(gpio::Level::High).degrade(),
rxd: p0.p0_20.into_floating_input().degrade(),
cts: Some(p0.p0_17.into_floating_input().degrade()),
rts: Some(p0.p0_13.into_push_pull_output(gpio::Level::High).degrade()),
},
)
};
let uarte_conn = Uarte::new(
uart0,
cdc_pins,
uarte::Parity::EXCLUDED,
uarte::Baudrate::BAUD115200,
)
I don't think that this is an issue with the library but rather with my usage of it, I just didn't really know where to ask else :)
1c3t3a commented
Solved it on my own!