Skip to content

Commit bd0f7d8

Browse files
author
Jonathan Pallant (42 Technology)
committed
Stop TX before we wait for TX to stop.
1 parent 1facd18 commit bd0f7d8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

nrf-hal-common/src/uarte.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ where
4545
pub fn new(uarte: T, mut pins: Pins, parity: Parity, baudrate: Baudrate) -> Self {
4646
// Is the UART already on? It might be if you had a bootloader
4747
if uarte.enable.read().bits() != 0 {
48+
uarte.tasks_stoptx.write(|w| unsafe { w.bits(1) });
4849
while uarte.events_txstopped.read().bits() == 0 {
4950
// Spin
5051
}

0 commit comments

Comments
 (0)