With the minimal example below, I can't get any output from uarte. Anything more complex trying to read or using BufferedUarte doesn't work either. I'm using nrf5340-app-s and embassy from git with the nightly-2024-03-20 toolchain.
#![feature(type_alias_impl_trait)]
#![no_std]
#![no_main]
use {defmt_rtt as _, panic_probe as _};
use embassy_executor::Spawner;
use embassy_nrf::{
bind_interrupts,
peripherals,
uarte::{self, Parity, Baudrate, Uarte},
};
use embassy_time::Timer;
bind_interrupts!(struct Irqs {
SERIAL0 => uarte::InterruptHandler<peripherals::SERIAL0>;
});
#[embassy_executor::main]
async fn main(spawner: Spawner) {
let p = embassy_nrf::init(Default::default());
let mut config = uarte::Config::default();
config.parity = Parity::EXCLUDED;
config.baudrate = Baudrate::BAUD115200;
let mut uart = Uarte::new(
p.SERIAL0, Irqs,
p.P1_15, p.P0_13,
config,
);
uart.write(b"AT\r\n").await.unwrap();
loop {
Timer::after_millis(300).await;
};
}
I have also tested a variation of this on the nRF52833 devkit (SERIAL0 => UARTE1, P1_15 => P0_07, P0_13 => P0_08) and have a similar result of no output on the TX pin when observed with a logic analyzer. The TX pin is pulled high on the nRF5340, but not on the nRF52833. Logs from nRF5340 below.
With the minimal example below, I can't get any output from uarte. Anything more complex trying to read or using BufferedUarte doesn't work either. I'm using nrf5340-app-s and embassy from git with the nightly-2024-03-20 toolchain.
I have also tested a variation of this on the nRF52833 devkit (SERIAL0 => UARTE1, P1_15 => P0_07, P0_13 => P0_08) and have a similar result of no output on the TX pin when observed with a logic analyzer. The TX pin is pulled high on the nRF5340, but not on the nRF52833. Logs from nRF5340 below.
Am I missing something here about how to setup Uarte?