LPSPI FreeRTOS Initialization Only for Master?

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

LPSPI FreeRTOS Initialization Only for Master?

跳至解决方案
1,075 次查看
nbgatgi
Contributor IV

Within the MCUXpresso SDK, the non-RTOS initialization drivers for LPSPI include "LPSPI_MasterInit" and "LPSPI_SlaveInit".  When FreeRTOS is included, the associated RTOS driver is "LPSPI_RTOS_Init" which I initially presumed would have parameters for master or slave, but that doesn't appear to be the case.  Within LPSPI_RTOS_Init, LPSPI_MasterInit is called, but LPSPI_SlaveInit is not.  In fact, in the file "fsl_lpspi_freertos.c" there is no reference to the word "slave" at all!

When looking at the LPSPI / FreeRTOS example code (not available in the SDK for the RT1060 and RT1064), the FreeRTOS slave task initializes directly with "LPSPI_SlaveInit".

Why is their only a master LPSPI initialization function for FreeRTOS?

标签 (1)
0 项奖励
1 解答
867 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Nick:

Currently we do not plan to prepare FreeRTOS SPI slave driver. We have created initial set of drivers and we decided that Baremetal ISR api is most appropriate for use.

SPI slave is usually implementing custom protocol, where number of transferred bytes depends on payload (command) sent, most of such processing should be done directly in the ISR.

Regards

Daniel

在原帖中查看解决方案

0 项奖励
1 回复
868 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Nick:

Currently we do not plan to prepare FreeRTOS SPI slave driver. We have created initial set of drivers and we decided that Baremetal ISR api is most appropriate for use.

SPI slave is usually implementing custom protocol, where number of transferred bytes depends on payload (command) sent, most of such processing should be done directly in the ISR.

Regards

Daniel

0 项奖励