s32k146 lpspi communication

cancel
Showing results for 
Search instead for 
Did you mean: 

s32k146 lpspi communication

427 Views
carolineliu_wiw
Contributor II

Hi everyone!

I' m using s32k146, trying to use lpspi communicaton. My s32k146 acts as Master Device to send data, and imu device act as slave device. But now I can not receive data from slave device.

Here is my lpspi configuration.

pastedImage_1.png

Here is my main code.

pastedImage_2.png

pastedImage_3.png

count = 1000;

can anyone help?

0 Kudos
2 Replies

345 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi carolineliu_wiw@163.com‌,

The configuration looks good, could you try using a logic analyzer/oscilloscope to check if the IMU is responding to the transfer? 

Also, check that pin configuration is done correctly. The following shows the pin configuration used in the SDK example.

pastedImage_1.png

Best Regards,

Alexis Andalon

0 Kudos

345 Views
carolineliu_wiw
Contributor II

Hi Alexis Andalon,

Thanks for your reply.

I have already found the error. I use DMA, but I didn't  initialize it.

Now my spi communication can work.

:smileyhappy:

Liu

0 Kudos