S32K144 LPSPI Continuous Transfer problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K144 LPSPI Continuous Transfer problem

2,003 次查看
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?

标签 (1)
标记 (2)
0 项奖励
回复
2 回复数

1,834 次查看
markulhu
Contributor II

Hi diana, thanks for your help!

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

0 项奖励
回复

1,834 次查看
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 项奖励
回复