S32K144 LPSPI clock how to set 40MHZ

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

S32K144 LPSPI clock how to set 40MHZ

4,096 Views
weiq
Contributor I

when I use S32KDS set LPSPI clock ,pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

and seeting  nterface

pastedImage_4.png

pastedImage_5.png

pastedImage_6.png

but logical analyzer always  4Mhz

pastedImage_8.png

of course LPSPI Baudrate is 40MHZ

pastedImage_9.png

how to set 40MHZ baudrate

Tags (3)
0 Kudos
Reply
4 Replies

2,001 Views
wjandsq
Contributor IV
 
S32 Design Studio for ARM v2.2  ProcessorExpert  Configuration  in  LPSPI_CLK.png  file
0 Kudos
Reply

2,004 Views
wjandsq
Contributor IV

SPI functional clock (source clock) can be set max 80MHz in Run mode ,  Function Clock select SPLLDIV2_CLK for 80MHz.

and ProcessorExpert.pe  Components  lpspicom1: lpspi  Baudrate (Hz) is set 40000000,   Clock Source is 80000000 is read only.

0 Kudos
Reply

3,669 Views
wjandsq
Contributor IV

LPSPI_24Mbps_Baud_Rate-2.pngLPSPI_24Mbps_Baud_Rate.png

NXP FS32K144HAT0MLHT LQFP-64(VDD  3.3V) Read  3V SPI NOR FLASH  One Page Data test !   Serial CLK  is 24MHz! 

 

 

0 Kudos
Reply

4,000 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

Baudrate = SPI functional clock / 2^TCR[PRESCALE] / (CCR[SCKDIV] +2)

Since the  SPI functional clock (source clock) can be set max 48MHz in Run mode and 

The SCK period is equal to (SCKDIV+2) cycles of the LPSPI functional clock divided by the Prescaler Value TCR[PRESCALE] configuration, so, theoretically, we cannot set a baudrate more than 24 MHz.

However, you can see that the baudrate can be set max to 10MHz in Run Mode in "Table 46. LPSPI electrical specifications" in the DS rev 13.

Using the Master Loopback feature you can set max 20 MHz in Run Mode when MCU runs at 5V power supply.

I would like to suggest looking at the example code located in the S32DS -> File -> New -> S32DS Project from Example

I hope it helps.

Best regards,

Diana