We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3dda52f commit 798c390Copy full SHA for 798c390
cores/nRF5/Uart.cpp
@@ -156,9 +156,15 @@ void Uart::end()
156
157
nrfUart->INTENCLR = UARTE_INTENSET_ENDRX_Msk | UARTE_INTENSET_ENDTX_Msk;
158
159
+ nrfUart->EVENTS_RXTO = 0;
160
+ nrfUart->EVENTS_TXSTOPPED = 0;
161
+
162
nrfUart->TASKS_STOPRX = 0x1UL;
163
nrfUart->TASKS_STOPTX = 0x1UL;
164
165
+ // Wait for TXSTOPPED event and for RXTO event
166
+ while ( !(nrfUart->EVENTS_TXSTOPPED && nrfUart->EVENTS_RXTO) ) yield();
167
168
nrfUart->ENABLE = UARTE_ENABLE_ENABLE_Disabled;
169
170
nrfUart->PSEL.TXD = 0xFFFFFFFF;
0 commit comments