MK64 UART jitter

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MK64 UART jitter

Jump to solution
794 Views
raymondwhite
Contributor III

Hello

I am using a MK64FX512. I use the 50MHz Ethernet clock to produce a core clock rate of 120MHz (divide by 15, multiply by 36). I set the SIM_CLKDIV1 register to set the core rate to divide-by-1 (120MHz) and the bus clock to divide-by-2 (60MHz).

I set the baud rates for UART0 and UART1 to 57600 and 117187.5 respectively (yes, 117187.5 is a legitimate baud rate as long the processor on the mating side uses that same frequency).

When I measure a character like 0xAA on the scope, I see that each bit timing in the byte for both UART0 and UART1 are very precise.

On the other hand for UART4, which uses the bus clock, what I see on the oscilloscope is that while the overall timing for the byte is correct, by the low-going bits are substantially narrower than the high-going bits. I've observed this with the baud rate set to 57600 and 117187.5. Not only are the relative widths of the ones and zeros bits off, but the widths shift around substantially. The variation is much greater that the 1/16th bus clock cycle I would expect to see.

This is puzzling to me since both the core and bus clocks are derived from the same MCGOUTCLK clock. Nothing I have seen in the reference manual explains why the bus clock would cause the UART output to jump around more than the core clock.

Anyone have an idea?

Thanks

-Ray

0 Kudos
1 Solution
648 Views
raymondwhite
Contributor III

OK... mystery solved. It was my mistake. I was monitoring the output of UART4 after it exited a digital isolator chip. When I monitor the line coming directly off the MK64, the timing is flawless. I ended up having to replace the isolator to fix the problem.

View solution in original post

0 Kudos
4 Replies
649 Views
raymondwhite
Contributor III

OK... mystery solved. It was my mistake. I was monitoring the output of UART4 after it exited a digital isolator chip. When I monitor the line coming directly off the MK64, the timing is flawless. I ended up having to replace the isolator to fix the problem.

0 Kudos
648 Views
jerrygardner
Contributor III

Try divide by 20, multiply by 48 and see if that helps.

0 Kudos
648 Views
raymondwhite
Contributor III

I tried divide-by-20, multiply-by-48.  It had no effect on the problem I am seeing.

Regards

-Ray

0 Kudos
648 Views
jerrygardner
Contributor III

Are you using the Baud Rate Fine Adjust bits in Control Register 4?

0 Kudos