aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2024-12-06 11:30:33 +0100
committerDario Nieuwenhuis <[email protected]>2024-12-06 11:33:39 +0100
commit0225221f8bfe71723f8673d9e316e9ab7d180782 (patch)
tree1eed62279fd1f1a40f1b15dcf96d2a18ac9c7349
parent03082a9cdf65bbb675b47fc6b4ea657939fcf01b (diff)
nrf/nfct: use the right error register for rx and tx.
-rw-r--r--embassy-nrf/src/nfct.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/embassy-nrf/src/nfct.rs b/embassy-nrf/src/nfct.rs
index a79cc5840..85866063a 100644
--- a/embassy-nrf/src/nfct.rs
+++ b/embassy-nrf/src/nfct.rs
@@ -328,7 +328,9 @@ impl<'d> NfcT<'d> {
328 328
329 if r.events_error().read() != 0 { 329 if r.events_error().read() != 0 {
330 trace!("Got error?"); 330 trace!("Got error?");
331 warn!("errors: {:08x}", r.errorstatus().read().0); 331 let errs = r.errorstatus().read();
332 r.errorstatus().write(|w| w.0 = 0xFFFF_FFFF);
333 trace!("errors: {:08x}", errs.0);
332 r.events_error().write_value(0); 334 r.events_error().write_value(0);
333 return Poll::Ready(Err(Error::RxError)); 335 return Poll::Ready(Err(Error::RxError));
334 } 336 }
@@ -382,7 +384,9 @@ impl<'d> NfcT<'d> {
382 if r.events_rxerror().read() != 0 { 384 if r.events_rxerror().read() != 0 {
383 trace!("RXerror got in recv frame, should be back in idle state"); 385 trace!("RXerror got in recv frame, should be back in idle state");
384 r.events_rxerror().write_value(0); 386 r.events_rxerror().write_value(0);
385 warn!("errors: {:08x}", r.errorstatus().read().0); 387 let errs = r.framestatus().rx().read();
388 r.framestatus().rx().write(|w| w.0 = 0xFFFF_FFFF);
389 trace!("errors: {:08x}", errs.0);
386 return Poll::Ready(Err(Error::RxError)); 390 return Poll::Ready(Err(Error::RxError));
387 } 391 }
388 392