AnsweredAssumed Answered

Hi Example how to use SPI in kinetis SDK - direct HAL mode

Question asked by Eli Arad on Jun 22, 2016
Latest reply on Jul 12, 2016 by Iva Dorazinova

Hi

 

I have an SPI external device that communicate through SPI ( registers and so)

I want to operate the KW40Z in SPI master mode where i will be able to  write and read  8 bytes.

I dont need the dspi package that do transfer of data from side to side, just the HAL.

My questions are:

1. is there an example how to do that simple work , because while investigating the subject i see that the SPI device is not linked and its under this define:

FSL_FEATURE_SOC_SPI_COUNT  which is 0.

This define close all the SPI HAL Device.

The current options i see now is to dig into the code of the API , enable the SPI and use the Hal_WriteData and ReadData

And configure the SPI to use as Master for external device.

 

It will be nice if NXP will provide an example project , that is mission is to enable SPI Master and read and write data to the HAL, No interrupts , no fifo , nothing, just read and write directly to the SPI.

 

Thanks,

Eli

Outcomes