S32K144 LPSPI clock how to set 40MHZ

cancel
Showing results for 
Search instead for 
Did you mean: 

S32K144 LPSPI clock how to set 40MHZ

203 Views
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
1 Reply

107 Views
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

0 Kudos