Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MXC_UART_Write - Incomplete Transmission #620

Open
BrentK-ADI opened this issue Jun 13, 2023 · 1 comment
Open

MXC_UART_Write - Incomplete Transmission #620

BrentK-ADI opened this issue Jun 13, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@BrentK-ADI
Copy link
Contributor

This issue is found in RevB UART drivers at a minimum. Other revisions have not been checked.

The MXC_UART_Write function uses the MXC_UART_WriteCharacterRaw function to transmit each character.

  • MXC_UART_WriteCharacterRaw is non-blocking, and will return E_OVERFLOW if the TXFIFO is full
  • MXC_UART_Write exits on any error received from MXC_UART_WriteCharacterRaw
  • As a result, writing buffers larger than the FIFO size will result in an incomplete transmission.

In contrast, MXC_UART_Read is a blocking function, waiting until all requested characters are read.

Consider modifying MXC_UART_Write to use MXC_UART_WriteCharacter instead, which will block until the character is written. Alternately, if keeping the implementation, update the MXC_UART_Write documentation to inform the user of the behavior.

Note: This has an impact on the STDIO capabilities of the Maxim platform in the No-OS framework. Currently print statements in No-OS are truncated when built against this MSDK version. No-OS maxim_uart.c, Line 142

@Jake-Carter
Copy link
Contributor

Thanks @BrentK-ADI, sorry for the delay on this ticket.

@sihyung-maxim do you have any bandwidth to pick this up?

Consider modifying MXC_UART_Write to use MXC_UART_WriteCharacter instead

I'm in favor of this to keep our behavior consistent as we discussed in #285, but #283 got merged and hit all RevB parts.

@Jake-Carter Jake-Carter added the bug Something isn't working label Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants