Maximum SPI Clock (output) speed LPC54S018 EVK

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Maximum SPI Clock (output) speed LPC54S018 EVK

ソリューションへジャンプ
2,040件の閲覧回数
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,014件の閲覧回数
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 返答(返信)
2,002件の閲覧回数
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,015件の閲覧回数
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,005件の閲覧回数
jainilshah
Contributor III

Thanks.

0 件の賞賛
返信