S32K144 spi

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

S32K144 spi

2,032件の閲覧回数
yinzc
Contributor I

Hi,what the maximum data length transmitted at one time?I try to transmit 72 bits but only 32 bits transmitted.

0 件の賞賛
12 返答(返信)

1,971件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@yinzc

1.

Senlent_0-1665469709710.png

2.

Senlent_1-1665469770233.png

3.the blue one is LPSPI1_PCS3 and the yellow one is LPSPI1_SOUT.

Senlent_2-1665469815262.png

note,here i did not observe the waveform of LPSPI1_SIN,because there is no slave device on my side,so i am not sure what i configured is correct,you can test is with your slave device.

 

0 件の賞賛

1,946件の閲覧回数
yinzc
Contributor I

Hi,i am trying to send 40bits data whitch is 25ms cyclic.

The first group of data is shown followin

scope_38.bmp

The second group of data is shown followin

scope_39.bmp

The third group of data is shown followin\

scope_41.bmp

The first two groups are both normal. The third group is a little abnormal. After the third group sends, both the chip selection and the clock are pulled down. They should be pulled up normally and no data is sent after three times.

Can you help me solve this problem?

Best regards

Thanks

 

 

 

0 件の賞賛

1,941件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

你自己先找下原因,监控下Status Register (SR) 看看有什么异常,不接slave device会不会这样,可以改一下我提供的示例代码,将收发单独分开来(先都发完再读FIFO),然后再测一下,还有会不会是slave device的特性,自己拉低了总线,

0 件の賞賛

1,934件の閲覧回数
yinzc
Contributor I

你好,是SR寄存器的MBF置位了,我现在用的是SPI1,我用相同的配置配置SPI0,数据能正常循环发送,请问这是什么原因呢

0 件の賞賛

1,931件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

会不会你的两个模块的设置上存在差异,SR的其它只有MBF异常吗?FIFO overflow可能也会导致MBF异常,速度再降一下,你先排查一下吧,下周问题没头绪,再讨论吧

0 件の賞賛

1,965件の閲覧回数
yinzc
Contributor I

Thanks Senlent,It helps me a lot.

0 件の賞賛

2,012件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@yinzc

       The TX FIFO for each spi instance has 4 words, one word size = 32 bits. The length of TDR is 32 bits, and the data written to the FIFO is 32 bits each time.(TDR:Transmit Data Register).

0 件の賞賛

2,009件の閲覧回数
yinzc
Contributor I

Hi,Senlent.

Thank you for your reply,how to write register if i want to transmit a 72 bits data? 

0 件の賞賛

2,006件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@yinzc

Can you tell me which IDE and library you are using?  or you can send me your demo code.

     

0 件の賞賛

2,002件の閲覧回数
yinzc
Contributor I

Hello, i'm using S32 Design Studio for ARM Version 2018.R1 and the demo is  'LPSPI_s32k144'.

Please see the following pic.

yinzc_0-1665390169468.png

 

0 件の賞賛

1,996件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

thank you, and  I need  some time to finish this demo.

0 件の賞賛

1,977件の閲覧回数
yinzc
Contributor I

Thanks.

I'm looking forward to your reply.

 

0 件の賞賛