S32K144 LPSPI Continuous Transfer problem

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

S32K144 LPSPI Continuous Transfer problem

962 Views
markulhu
Contributor II

hi,

I want to using "Continuous Transfer" function, but  no data received after first writing tx fifo. 

LPSPI1->CR = 0x0302; /* Reset Module */
LPSPI1->CR = 0x0008; /* Enable debug mode */
LPSPI1->CFGR0 = 0x00000000UL;
LPSPI1->CFGR1 = 0x00000001UL; /* Master */
LPSPI1->CCR = 0x00000000UL;
LPSPI1->FCR = 0x00000003UL;
LPSPI1->IER = 0x00001A02UL; /* RDIE=1 FCIE=1 TIEI=1 REIE=1 */
LPSPI1->CR |= 0x00000001UL; /* Enable Module */

LPSPI1->TCR = 0x0820001FUL; /* PRESCALE:/2 CONT=1 FRAMESIZE:32 */
LPSPI1->TDR = 0x12345678UL;
LPSPI1->TCR = 0x0830001FUL; /* PRESCALE:/2 CONT=1 CONTC=1 FRAMESIZE:32 */
for (i = 0; i < 1000; i++) {}

LPSPI1->TDR = 0x12345678UL; /* 1st break point, run to here is no interrupt occured  before to here */
LPSPI1->TCR = 0x0830001FUL; /* PRESCALE:/2 CONT=1 CONTC=1 FRAMESIZE:32 */
for (i = 0; i < 1000; i++) {}

LPSPI1->TDR = 0x12345678UL; /* 2nd break point , interrupt occured before to here */
LPSPI1->TCR = 0x0830001FUL; /* PRESCALE:/2 CONT=1 CONTC=1 FRAMESIZE:32 */

what's the problem?

Labels (1)
0 Kudos
2 Replies

793 Views
markulhu
Contributor II

Hi diana, thanks for your help!

today, i finish my spi driver, it works ok.

0 Kudos

793 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

This question has been already discussed in this community thread I assume that it is the same behavior:

https://community.nxp.com/message/1033839?commentID=1033839#comment-1033839 

I hope it helps.

Best regards,

Diana

0 Kudos