You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Always arm the "TX FIFO Empty" interrupt after we write into _tx_buffer.
This avoids a race where the interrupt handler detects an empty _tx_buffer
just before we write data into it.
Note that commit d6f6294 works around
this race when data is continually added to _tx_buffer in the hung state.
We revert that change here as the race should no longer occur.
Testing performed:
- set UART_CONF1.txfifo_empty_thrhd=0x70 (which exacerbates the issue)
- generate a ~240 byte burst of data, sent in back-to-back Serial1.write(, 4)
calls, optionally followed by a Serial1.flush()
Test results:
- before this change, observe occasional unsent data and hang in flush()
(if used).
- after this change, data is sent as expected.
0 commit comments