Philips LPC UART & CAN baud rates with 1 XTAL

Jan 31, 2006 2 Replies

Hi all,



Anyone some advice or experience on calculating the Xtal freq for a LPC22xx ARM7.



I just don't find a correct value to generate stnadard UART baudrates (9600, 19200, 38400..) and standard CAN-bus speeds (125,250,500,1000)



At this moment i have a 17.456MHz Xtal and this is working fine for the UART.



For the CAN-bus, a multiple of 8Mhz should work fine.



I tried to get to a compromis by changing PLL and Peripheral clock speeds, but it seems that there is no value that would exactly meet both requirments.



Any suggestions on how to find the right frequency ?



Thanks



Stan



I use 8MHz and 16MHz crystals in many of my designs and the baudrates generated with that clock are close enough to the desired values. I have never had problems up to 57600. The largest error occurs at 8MHz and 57600, where it is 3.5% off.

Meindert

If you want to use CAN, you have to use a multiple of of 8 MHz or a multiple of 12 MHz. The UART will be limited afaik to 38400 with 60 MHz CPU frequency (Crystal 12 *5 PLL)

What is needed is what Philips has introduced on the LPC214x devices, a so called fractional baudrate generator.

Hopefully this will be implemented in the CAN devices as well because it would enable 115200 and all CAN baudrates with a 12 MHz crystal.

An Schwob

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required