Hi David,
Sorry for the delay, I have checked the example code suggested by you.
In my application, I am using S32K148 Eval board as a master SPI device and a 20 X 4 LCD (NHD-0420D3Z-FL-GBW-V3) as a SPI slave device. In the application I am using the same LPSPI1_init_master() function given in the example to initialize the S32K148 as a master device.
In the application, I am trying to display characters on the LCD. When I run the application in debug mode (by using step into, step over options) I am able to print the characters on the LCD without any issues. But when I am trying to do it in free run, I am able to see just 2-3 characters printed on the LCD. If I pause the execution, I can see it is waiting at the line, while((LPSPI1->SR & LPSPI_SR_TDF_MASK)>>LPSPI_SR_TDF_SHIFT==0); in the LPSPI1_transmit_16bits (uint16_t send) function.
Now if I again resume the execution, again 2-3 characters are printed on the LCD screen and again the same scenario repeats. Again if I pause and resume again 2-3 characters are printed. I have attached the program files for reference. Please let me know if I have to make any changes.