Hello all,
I am using S32K148 LQFP176, and I am trying to get data from from another device, using SPI. Thus, I am trying to use LPSPI0 with the following pins: PTD15 (LPSPI0_SCK as input), PTD16 (LPSPI0_SIN as input), PTA30 (LPSPI0_SOUT as output) and PTA26 (LPSPI0_PCS0)
For initializing the slave state, I was using this function: LPSPI_DRV_SlaveInit(INST_LPSPI_1, &lpspi_2State, &lpspi_1_SlaveConfig0);
For adding the interrupt I was using the following functions:
INT_SYS_InstallHandler(LPSPI0_IRQn, SPI0_Slave_ISR, (isr_t*) 0);
INT_SYS_EnableIRQ(LPSPI0_IRQn);
To get the data, I was expecting to have one register which I need to check it every time when the SPI0_Slave_ISR function is called, but I don't know how to read the data.
Is there any example or can you give me some details how to get the SPI data?