s32k312 lpspi mode

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

s32k312 lpspi mode

742 Views
fengba_360
Contributor III
Hello, if I don't want to use the DMA+SPI transmission method and instead only use the SPI polling method, do I only need to initialize SPI and call the data sending function? Like so
 
step1: Lpspi_Ip_Init(&Lpspi_Ip_PhyUnitConfig_SpiPhyUnit_0_Instance_0);
 
step2:Lpspi_Ip_SyncTransmit(&Lpspi_Ip_DeviceAttributes_SpiExternalDevice_0_Instance_0,
TX, RX, len, SPI_TIME_OUT);
Whether interrupt configuration is also needed when using SPI in polling mode?
IntCtrl_Ip_EnableIrq(LPSPI0_IRQn);
IntCtrl_Ip_InstallHandler(LPSPI0_IRQn, Lpspi_Ip_LPSPI_0_IRQHandler, NULL_PTR);
0 Kudos
Reply
1 Reply

712 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @fengba_360 

I suggest you check out the SPI sample codes provided with the RTDs. The sample codes show the use of the Flexio_Spi and the LPSPI drivers to transfer data between the Flexio_Spi and Lpspi physical units, one configured in interrupt mode with DMA and the other in polling mode.

 

BR, VaneB

0 Kudos
Reply