Skip to content

Commit 91ecc52

Browse files
authored
Merge pull request #4003 from productize/master
Fixed OBOE in async serial tx for NRF52 target, fixes #4002
2 parents 405ab0c + 5c4c6ac commit 91ecc52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

targets/TARGET_NORDIC/TARGET_NRF5/serial_api.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,13 @@ void UART_IRQ_HANDLER(void)
199199

200200
#if DEVICE_SERIAL_ASYNCH
201201
if (UART_CB.tx_active) {
202-
if (++UART_CB.tx_pos <= UART_CB.tx_length) {
202+
if (UART_CB.tx_pos < UART_CB.tx_length) {
203203
// When there is still something to send, clear the TXDRDY event
204204
// and put next byte to transmitter.
205205
nrf_uart_event_clear(UART_INSTANCE, NRF_UART_EVENT_TXDRDY);
206206
nrf_uart_txd_set(UART_INSTANCE,
207207
UART_CB.tx_buffer[UART_CB.tx_pos]);
208+
UART_CB.tx_pos++;
208209
}
209210
else {
210211
// When the TXDRDY event is set after the last byte to be sent

0 commit comments

Comments
 (0)