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.
2 parents 3dda52f + 5688870 commit f51a7faCopy full SHA for f51a7fa
cores/nRF5/Uart.cpp
@@ -156,9 +156,17 @@ 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
+ // This is required before disabling UART to fully power down transceiver PHY.
167
+ // Otherwise transceiver will continue to consume ~900uA
168
+ while ( !(nrfUart->EVENTS_TXSTOPPED && nrfUart->EVENTS_RXTO) ) yield();
169
170
nrfUart->ENABLE = UARTE_ENABLE_ENABLE_Disabled;
171
172
nrfUart->PSEL.TXD = 0xFFFFFFFF;
0 commit comments