I setup a K64 uart1 to windows host ( c#)
two thing i see
1. The first byte that being sent is always zero.
i am using the polling example ( modified to UART1)
2. the tx output fifo is inverted by default , so i needed to set the C3 tx fifo bit
C3 = C3 | 0x10;
1. how to fix the first zero byte
2. why the default is that data are inverted?
the RX is also inverted , so i changed RXINV in S2 to 1.
The RX( host to k64) does not have additional zero only the k64->host have additional one zero after reset.
One thing i can answer:
if the first command after reset is TX from k64 to host , I get extra zero
if the first command is host -> k64 and then k64->host , there is no extra first zero.
so i think there is a bug in this scenario.
can some one confirm?
also , left the invert problem.
Could you please attach your scope shot ? Rx line and Tx line？
Do you use the NXP TWR-board or Freedom Board? what else did you change, other than the UART1?
I dont have scope shot.
I am using FRDM k64
I wrote the code on K64 and on host c# , and got the findings i described
I would suggest you run the NXP released polling demo.
Please also check the hardware connection to PC.
K64 uart tx <--> PC Rx
K64 uart rx <--> PC tx