when I use S32KDS set LPSPI clock ，
and seeting nterface
but logical analyzer always 4Mhz
of course LPSPI Baudrate is 40MHZ
how to set 40MHZ baudrate
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.
Retrieving data ...