LPSPI FreeRTOS Initialization Only for Master?

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

LPSPI FreeRTOS Initialization Only for Master?

Jump to solution
1,080 Views
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?

Labels (1)
0 Kudos
1 Solution
872 Views
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

View solution in original post

0 Kudos
1 Reply
873 Views
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 Kudos