SPI not working with 2mbps baudrate on example code

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

SPI not working with 2mbps baudrate on example code

439 Views
Sukumar21
Contributor II

Dear  Nxp team,

 

I have an s32k144 EVM board. In this i am trying to establish SPI communication. I have used the Design studio 3.4. and I am using example lpspi_transfer_s32k146 sample project. I tried testing it with default setting (1mbps baud rate on spi). This works OK. but when i change the baud rate to 2mbps, the clock is distorted the spi fails.

I have attached the Config tool file for 1mbps and 2mbps setting

Clock with 2mbps setting:

Sukumar21_0-1696589639480.png

clock with 1 mbps:

Sukumar21_3-1696589802734.png

 

 

I have also attached the project zip.

 

 

0 Kudos
3 Replies

412 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

maybe this is just sample issue on analyzer itself. Do you have selected sample rate high enough?
A 2MHz is not so high freq for an output pin, and data is clocked out at higher rate.

BR, Petr

409 Views
Sukumar21
Contributor II

Hey Petr, Thanks for reply, SO i have slave IC that works on SPI at 2M-6M clock data rate. and i have to interface it with s32k146.
The problem was communication never got through hence i have to shift to logic analyzer.

The same is seen on DSO also.

0 Kudos

361 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I tried your code on S32K146EVB and below is signal measured

PetrS_0-1696933952524.png

I see no issue here.

BR, Petr

0 Kudos