Skip to content

Commit e435583

Browse files
committed
mimxrt: Fix a bug in uart.write().
Causing an incomplete send if the data size was longer than the buffer size.
1 parent a77a47a commit e435583

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/mimxrt/machine_uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ STATIC mp_uint_t machine_uart_write(mp_obj_t self_in, const void *buf_in, mp_uin
396396

397397
// Wait at least the number of character times for this chunk.
398398
t = ticks_us64() + (uint64_t)xfer.dataSize * (13000000 / self->config.baudRate_Bps + 1000);
399-
while (self->handle.txDataSize) {
399+
while (self->tx_status != kStatus_LPUART_TxIdle) {
400400
// Wait for the first/next character to be sent.
401401
if (ticks_us64() > t) { // timed out
402402
if (self->handle.txDataSize >= size) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy