This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UART emits spurious zero byte

Hello,

I am working with the uart module. While configuring the uart I encounter 2 issues.

First when in the uart_init function the pin for uart output is configured, a zero byte is emitted. This also happens some time after the last byte is transmitted, I suspect when the uart task is halted.

A second point is that when the init function is called via the init macro a structure "comm_params" is passed. I put the desired values in this structure, specifically, I set flow control disabled. The init function however for some unknown reason executes the code for flow control enabled. The result is 1 byte received and because the mismatch in flow control nothing more is received. When I overrule this behaviour using a local variable for flow control in the init function, everything works except for the above mentioned point.

Has someone seen this?

Thanks

Related