Maximum SPI Clock (output) speed LPC54S018 EVK

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Maximum SPI Clock (output) speed LPC54S018 EVK

跳至解决方案
2,037 次查看
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 项奖励
回复
1 解答
2,011 次查看
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 项奖励
回复
3 回复数
1,999 次查看
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 项奖励
回复
2,012 次查看
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 项奖励
回复
2,002 次查看
jainilshah
Contributor III

Thanks.

0 项奖励
回复