S32K144 LPSPI getting stuck in "void LPSPI1_transmit_16bits (uint16_t send)" function
I tried debugging LPSPI code from example projects.
When i started debugging, the transmit function executes 8 times without any interruption, then it gets stuck in
"void LPSPI1_transmit_16bits (uint16_t send)" function in LPSPI.c
- I used a global variable and incremented it after "void LPSPI1_transmit_16bits (uint16_t send)" function. The variable value never exceeded 8. After transmit function executes 8 times, it gets stuck in while((LPSPI1->SR & LPSPI_SR_TDF_MASK)>>LPSPI_SR_TDF_SHIFT==0); in transmit function.
- I tried giving slight delay after it transmits each time, but the issue remains same.
- I haven't used any interrupts.
Please provide solution for this.
update, i have attached project zip file to this.
You can find same code in example projects for S32K144 in S32DS.