EmbeddedRelated.com
Forums

UART, SPI and SSP max speed ???

Started by croquettegnu April 5, 2006
Hello all !

I'm working on the LPC214x family MCU and I need to know the different
max speed, throughput for their embedded UART, SPI and SSP because I
was not able to find them on the user manual ...

Thanks a lot!

An Engineer's Guide to the LPC2100 Series

--- In l..., "croquettegnu"
wrote:
>
> Hello all !
>
> I'm working on the LPC214x family MCU and I need to know the
different
> max speed, throughput for their embedded UART, SPI and SSP because
I
> was not able to find them on the user manual ...
>
> Thanks a lot!
>

AFAIK:
Max UART speed is PCLK/16
Max SPI speed is PCLK/8
Max SSP speed is PCLK/2
Max PCLK frequency is 60 MHz

Regards,
Max
--- In l..., "theothervmax" wrote:
> AFAIK:
> Max UART speed is PCLK/16

On LPC2292, with 14.7456 MHz xtal, PLL disabled, VPBDIV set to 1 and
UART0 baud rate divisor set to 4, it runs okay at 230400 baud.

Jaya
--- In l..., "jayasooriah"
wrote:
>
> --- In l..., "theothervmax" wrote:
> > AFAIK:
> > Max UART speed is PCLK/16
>
> On LPC2292, with 14.7456 MHz xtal, PLL disabled, VPBDIV set to 1
and
> UART0 baud rate divisor set to 4, it runs okay at 230400 baud.
>
> Jaya
>

>From the UM:
"The UART0 Divisor Latch is part of the UART0 Baud Rate Generator
and holds the value used to divide the VPB clock (pclk) in
order to produce the baud rate clock, which must be 16x the desired
baud rate."
It's all right with your example, baud rate divisor set to 4, but
you should not forget that this frequency has been divided by 16 to
produce this baud rate: 14745600/4/16 = 230400.
So, the maximum baudrate cannot exceed pclk/16 anyway.

Regards,
Max
--- In l..., "theothervmax" wrote:
>
> --- In l..., "jayasooriah"
> wrote:
> >
> > --- In l..., "theothervmax" wrote:
> > > AFAIK:
> > > Max UART speed is PCLK/16
> >
> > On LPC2292, with 14.7456 MHz xtal, PLL disabled, VPBDIV set to 1
> and
> > UART0 baud rate divisor set to 4, it runs okay at 230400 baud.
> >
> > Jaya
> > From the UM:
> "The UART0 Divisor Latch is part of the UART0 Baud Rate Generator
> and holds the value used to divide the VPB clock (pclk) in
> order to produce the baud rate clock, which must be 16x the desired
> baud rate."
> It's all right with your example, baud rate divisor set to 4, but
> you should not forget that this frequency has been divided by 16 to
> produce this baud rate: 14745600/4/16 = 230400.
> So, the maximum baudrate cannot exceed pclk/16 anyway.
>
> Regards,
> Max
>
Thanks all !
--- In l..., "jayasooriah" wrote:
>
> --- In l..., "theothervmax" wrote:
> > AFAIK:
> > Max UART speed is PCLK/16
>
> On LPC2292, with 14.7456 MHz xtal, PLL disabled, VPBDIV set to 1 and
> UART0 baud rate divisor set to 4, it runs okay at 230400 baud.
>
> Jaya
>

Hi,
If you use a 2292 @ 14.7456 MHz you should buy the LPC2214 instead. It
is cheaper but does not have CAN. If you use CAN, you can not use
14.7456 MHz.
=================The statements about max speeds apply for a VPBDIV of 1, be aware that
the default after reset is VPBDIV=4, so max speed is:

UART = CPU/16/VPBDIV
SPI = CPU/8/VPBDIV
SSP = CPU/2/VPBDIV

Bob
At 04:21 PM 4/5/2006 +0000, lpc2100_fan wrote:
>If you use a 2292 @ 14.7456 MHz you should buy the LPC2214 instead. It
>is cheaper but does not have CAN. If you use CAN, you can not use
>14.7456 MHz.

OK, I'll bite. Why would using CAN preclude the use of 14.7456 MHz. I can
understand that it might make it difficult to meet the standard baudrates
some HLPs use but disabling the CAN entirely?

Robert

" 'Freedom' has no meaning of itself. There are always restrictions, be
they legal, genetic, or physical. If you don't believe me, try to chew a
radio signal. " -- Kelvin Throop, III
http://www.aeolusdevelopment.com/
--- In l..., "lpc2100_fan" wrote:
> If you use a 2292 @ 14.7456 MHz you should buy the LPC2214 instead. It
> is cheaper but does not have CAN. If you use CAN, you can not use
> 14.7456 MHz.
> =================
I agree. Also, they dropped 2292 in the prototype that someone else
had lying around and meets requirements of this board.

> The statements about max speeds apply for a VPBDIV of 1, be aware that
> the default after reset is VPBDIV=4, so max speed is:
>
> UART = CPU/16/VPBDIV
> SPI = CPU/8/VPBDIV
> SSP = CPU/2/VPBDIV

On my board max is 230400 baud with PLL disabled. If I enable PLL and
set multiplier to 4 (all else being same) max is now 921600 baud.

So the smallest divisor works out to be to be 4 in both cases. Does
this mean UART baudrate limit is CPU/16/4/VPBDIV?

Suggestions anyone?

Jaya
--- In l..., "jayasooriah" wrote:
> On my board max is 230400 baud with PLL disabled. If I enable PLL and
> set multiplier to 4 (all else being same) max is now 921600 baud.
>
> So the smallest divisor works out to be to be 4 in both cases. Does
> this mean UART baudrate limit is CPU/16/4/VPBDIV?

Correction: I AM able to get 912600 baud with PLL disabled.
(Auto-baud sampling resolution was the limiting factor in earlier
experiment.)

However with PLL multiplier set to 4, I still am not able to get
higher baud rates.

I suspect this may have to do with tolerances of the two crystals (on
LPC and on FTDI chip) working against each other. I like to know if
anyone is operating at higher bauds.

Jaya
--- In l..., Robert Adsett wrote:
>
> At 04:21 PM 4/5/2006 +0000, lpc2100_fan wrote:
> >If you use a 2292 @ 14.7456 MHz you should buy the LPC2214 instead. It
> >is cheaper but does not have CAN. If you use CAN, you can not use
> >14.7456 MHz.
>
> OK, I'll bite. Why would using CAN preclude the use of 14.7456 MHz.
I can
> understand that it might make it difficult to meet the standard
baudrates
> some HLPs use but disabling the CAN entirely?
>
> Robert
>
> " 'Freedom' has no meaning of itself. There are always
restrictions, be
> they legal, genetic, or physical. If you don't believe me, try to
chew a
> radio signal. " -- Kelvin Throop, III
> http://www.aeolusdevelopment.com/
>

Hi Robert,

you are right, CAN could be used there is nothing the would stop it
from working. It is just like having a UART talking to the PC at 30
kbit/sec, possible yes. I was in deed referring to the standard
baudrates for CAN, all being very even numbers auch as 1Mbit, 500kbit,
250 kbit.... I would not know of a CAN network running at 115200 but
you are right in theory, not a problem, just need to find somebody
like another CAN node to talk to ;-)

Bob