K64 UART1 first char is zero

cancel
Showing results for 
Search instead for 
Did you mean: 

K64 UART1 first char is zero

313 Views
eliarad2
Contributor II

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;
UART_WriteC3(COMM_UART, C3);

2 questions:

1. how to fix the first zero byte 

2. why the default is that data are inverted?

Notes:

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.

Thanks!

0 Kudos
4 Replies

241 Views
eliarad2
Contributor II

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.

0 Kudos

241 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Eli:

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?

Regards

Daniel

0 Kudos

241 Views
eliarad2
Contributor II

Hi Daniel

I dont have scope shot.

just code.

I am using FRDM k64

I wrote the code on K64 and on host c# , and got the findings i described

0 Kudos

241 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Eli

I would suggest you run the NXP released polling demo.

boards\frdmk64f\driver_examples\uart\polling

Please also check the hardware connection to PC.

K64  uart tx  <-->  PC Rx

K64  uart rx  <--> PC tx 

Regard

Daniel

0 Kudos