- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the equivalent of blecm_getAvailableTxBuffers() for UART TX FIFO ?
How do I know how many bytes are currently available in 16 bytes TX FIFO before using e.g. puart_write function ?
P_UART_TX_FIFO_IS_EMPTY() macro only checks if TX FIFO is empty.
Solved! Go to Solution.
- Labels:
-
Peripherhal UART
-
SDK 2.X
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no API to get the number of bytes (or free bytes) in the TX FIFO. Even if there was one, the value returned will be invalid as soon as it is read from the HW block because the HW runs its own TX state machine and will stream the bytes out as long as the FIFO is non-empty. So any value read by such API will be stale. The only steady-state value is FIFO empty. Or the interrupt that it has reached the set watermark (which can be between 0 and 15 both included). See discussion mwf_mmfae linked to above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no API to get the number of bytes (or free bytes) in the TX FIFO. Even if there was one, the value returned will be invalid as soon as it is read from the HW block because the HW runs its own TX state machine and will stream the bytes out as long as the FIFO is non-empty. So any value read by such API will be stale. The only steady-state value is FIFO empty. Or the interrupt that it has reached the set watermark (which can be between 0 and 15 both included). See discussion mwf_mmfae linked to above.