S32K148-Q176 FreeRTOS Lpspi Communication

cancel
Showing results for 
Search instead for 
Did you mean: 

S32K148-Q176 FreeRTOS Lpspi Communication

739 Views
carolineliu_wiw
Contributor II

Hello!

I'm working with s32k148-q176 EVB and trying to test lpspi communication based on FreeRTOS. I find the example project "freertos_s32k148". then I change its code. Altough i can build this project with no problems, the lpspi communication does not work.

Here is rots_start function in rtos.c file.

pastedImage_10.png

Here is my Task function.

pastedImage_9.png

Here is related function.

pastedImage_7.png

Here is the Debug window.

pastedImage_8.png

The varibles status_slave and status_master are equal to 2. 

2 means, lpspi transfer is status busy.

I have no idea how to solve it.

Can anyone help?

0 Kudos
3 Replies

617 Views
raresvasile
NXP Employee
NXP Employee

Hello,

Are you calling LPSPI_DRV_MasterInit and LPSPI_DRV_SlaveInit ?

Thanks,

Rares

0 Kudos

617 Views
sandeepsandeepk
Contributor II

I also having a problem in which LPSPI_DRV_MasterInit and LPSPI_DRV_SlaveInit  both intialized and frertos stop at default isr when masterTransferBlocking or any spi transfer function is called from the any task. since i have intialized wdog it will retart the controller every time. 

0 Kudos

617 Views
carolineliu_wiw
Contributor II

Hi,

Maybe you can try to reset the interrupts priority of SPI.

Liu.

0 Kudos