S32K148-Q176 FreeRTOS Lpspi Communication

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K148-Q176 FreeRTOS Lpspi Communication

1,243 次查看
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 项奖励
3 回复数

1,121 次查看
raresvasile
NXP Employee
NXP Employee

Hello,

Are you calling LPSPI_DRV_MasterInit and LPSPI_DRV_SlaveInit ?

Thanks,

Rares

0 项奖励

1,121 次查看
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 项奖励

1,121 次查看
carolineliu_wiw
Contributor II

Hi,

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

Liu.

0 项奖励