Hi,
i want to use the mcu in object for UART communications and I need to configure the baud rate to 10Mbps.
This mcu has 6 uart modules, 2 of them (uart0 and uart1) clocked from core clock and the others clocked from bus clock.
My questions are: is there the possibility to make uart working @ 10Mbps?
how could configure the clocks (or the divisors of them) in order to obtain the desired badu rate?
Can i use all 6 modules or only uart0 and uart1?
Thanks
ok i've read that constraints on the Reference manual....
Is there any way to make UART working at 10 Mbps (i.e. an appropriate oscillator, not 50Mhz)?
Any ideas? Thanks
Hi
Since the UART 0/1 clock is derived from 1/16th the system clock you would need 160MHz system clock (PLL output) to be able to operate these UARTs at 10Mb/s. This is of course not possible with the device that you use (at least not within specification).
Note that when working with high speed UARTs DMA operation is also necessary. Some DMA priority tuning may also be required because I found that running multiple UARTs at highest speed with DMA could cause the Ethernet controller buffer to overrun, resulting in the Ethernet controller freezing and requiring a reset.Giving the Ethernet controller's DMA higher priority solved this though.
Regards
Mark
So another 2 questions:
UART2-6 are also not usable @ 10Mbps?
could you explain me better the point about the DMA?
thanks a lot
Hi
UARTs 2 to 5 can not run faster than 3.125MHz on the device that you are using (50MHz / 16).
If you had a UART running at 10Mb/s it would be interrupting at a rate of once every 1.0us (assuming 8 bits and no parity bit) and any delays to respond by an interrupt routine of just a few us will cause a FIFO overrun and so lost reception data. Therefore DMA becomes important to remove the interrupt loading and the response time requirements. The Kinetis has a good DMA controller and it can support DMA operation on all 6 UARTs (Tx and Rx at the same time). The use of DMA is advisable once the BAUD rate gets above, say, 500k and is probably absolutely necessary for reliable highest speed operation. Running 6 UARTs at high speed at the same time would mean these figures can be divided by about 6 since they would otherwise all be contending for the interrupt handling.
Regards
Mark
Hi Carlitos
The maximum baud rate is 1/16 of related source clock frequency. so if you are running at 100 MHz the maximum will be 100 MHz/16 that is less that 10Mbps.
this is show on the reference manual pag 158
http://www.freescale.com/files/32bit/doc/ref_manual/K60P144M100SF2V2RM.pdf
I hope this will help you.
Hi
Note also that that UARTs 0 and 1 are clocked from the system clock (max. 100MHz in your case) and UARTs 2..5 are clocked from the bus clock, which has a maximum speed of 50 MHz in your case.
UARTs 2..5 can therefore not operate at such a high speed as UARTs 0 and 1.
Regards
Mark