S32K144 LPSPI Continuous Transfer problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K144 LPSPI Continuous Transfer problem

2,013件の閲覧回数
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,844件の閲覧回数
markulhu
Contributor II

Hi diana, thanks for your help!

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

0 件の賞賛
返信

1,844件の閲覧回数
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 件の賞賛
返信