SPI clock speed

Questions on control of serial busses
Post Reply
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

SPI clock speed

Post by YahooArchive »

I am trying to find in the User manual what the clock speed I am running at. I
have a Super Pro Plus. According to the PCLK_SPI bits in the PCLKSEL0 register
they are set by default to 00 (CCLK/4). But what is this speed? I think the
CCLK is dependent on the PLL clock but I do not know where to find the info I am
looking for.

Basically I have to keep my SPI under 10 MHz for one of my SPI slave devices. I
do not know what to set the PCLK_SPI bits to if I do not know what the CCLK is.
The external crystal is 32kHz, correct?



YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: SPI clock speed

Post by YahooArchive »

CCLK is 96 MHz

PCLK is 24 MHz

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: SPI clock speed

Post by YahooArchive »

Ok, thanks. But the only choices for PCLKSEL0 are CCLK, CCLK/2, CCLK/4, and
CCLK/8. CCLK/8 will only give me 96/8= 12MHz. My max for my slave device is
10MHz. How and what do I change to get this down to 10 MHz?

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: SPI clock speed

Post by YahooArchive »

If you change PCLK you change it for all peripherals in the LPC17xx family, a
bad thing in BASIC

But almost all peripherals have pre-scalers of some sort to control the
frequency

in the SPI it's the S0SPCCR

in the 2 SSPs it's the CPSR

Post Reply