Maximum SPI Clock (output) speed LPC54S018 EVK

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

Maximum SPI Clock (output) speed LPC54S018 EVK

Jump to solution
912 Views
jainilshah
Contributor III

Hi,

I am working with LPC54S018 EVK and want to generate maximum SPI clock frequency. Below are my observations:-

1. Getting 12MHz clock inspite of attaching HF clock (kFRO_HF_to_FLEXCOMM9). No effect of increased baud rate. (All the SPI pins are connected)

2. Getting 48MHz clock when kFRO_HF_to_FLEXCOMM9 is used and baud rate is set to 48MHz. In this case, only SCLK is connected, other SPI pins are not connected.

Let me know how can I generate maximum SPI clock o/p frequency? Can I use FLEXCOMM0-9 to generate maximum SPI clock o/p? (FLEXCOMM10 is not available on EVK)

Also suggest what changes are required to generate max SPI clock o/p frequency?

0 Kudos
1 Solution
886 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Regarding the maximum SPI clock frequency of LPC54S018, pls refer to the data sheet of LPC54S018, the master mode, the SPI baud rate is 48M bit/s, in slave mode, the baud rate is 14M bit/s.

Assume that you want to get 48MHz for SCK signal, If you use the code  kFRO_HF_to_FLEXCOMM9, the SPI drivig clock will be 48MHz.

and you have to set up the SPI baud rate by writing the SPI divider regisyter as 0, the SPI_SCK clock frequency will be 48MHz.

Hope it can help you

xiangjun_rong_1-1645507861873.png

 

 

 

 

xiangjun_rong_0-1645507139975.png

 

View solution in original post

0 Kudos
3 Replies
874 Views
jainilshah
Contributor III

Please review my code changes as below. I have done modification in spi_dma_transfer demo app available inside SDK.

1. Added these lines.

/* attach 12 MHz clock to SPI2 */
CLOCK_AttachClk(kFRO_HF_to_FLEXCOMM2);

/* attach 12 MHz clock to SPI9 */
CLOCK_AttachClk(kFRO_HF_to_FLEXCOMM9);

2. Added this line.

masterConfig.baudRate_Bps = 48000000U;

Let me know in case anything is missing here.

0 Kudos
887 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Regarding the maximum SPI clock frequency of LPC54S018, pls refer to the data sheet of LPC54S018, the master mode, the SPI baud rate is 48M bit/s, in slave mode, the baud rate is 14M bit/s.

Assume that you want to get 48MHz for SCK signal, If you use the code  kFRO_HF_to_FLEXCOMM9, the SPI drivig clock will be 48MHz.

and you have to set up the SPI baud rate by writing the SPI divider regisyter as 0, the SPI_SCK clock frequency will be 48MHz.

Hope it can help you

xiangjun_rong_1-1645507861873.png

 

 

 

 

xiangjun_rong_0-1645507139975.png

 

0 Kudos
877 Views
jainilshah
Contributor III

Thanks.

0 Kudos