S32K144 SPI payload limitation upwards 512bytes

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

S32K144 SPI payload limitation upwards 512bytes

跳至解决方案
421 次查看
Khulan
NXP Employee
NXP Employee

Hello community,

I am working on S32K144 EVB board with NFC front-end device. S32K144EVB (master) communicates via SPI communication to NFC front-end device. 

I would like to transfer 2kB payload and however more than 512 bytes does not work and S32K SPI driver get stuck and not IRQ is received.

 

Does anyone know there, if there is certain limitation or managed to have bigger than 512bytes payload?

 

Best regards

Khulan

0 项奖励
1 解答
395 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Khulan,

Can you specify the revision of the drivers?

What frame size have you set?

The LPSPI module can send 4096b or 512B within one frame (TCR[FRAMESZ]), but it can send more frames in the continuous mode (TCR[CONT = 1]).

 

Regards,

Daniel

在原帖中查看解决方案

0 项奖励
7 回复数
396 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Khulan,

Can you specify the revision of the drivers?

What frame size have you set?

The LPSPI module can send 4096b or 512B within one frame (TCR[FRAMESZ]), but it can send more frames in the continuous mode (TCR[CONT = 1]).

 

Regards,

Daniel

0 项奖励
386 次查看
Khulan
NXP Employee
NXP Employee

Hello Daniel,

 

Thanks for the quick reply. I am using processor expert to generate my driver code and DMA mode is not enabled. It looks below. Where do you define TCR[FRAMESZ]) ?

Khulan_0-1714469171668.png

 

Best regards

Khulan

 

 

0 项奖励
381 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

The .bitcount is 8 in your configuration, one frame is 8bit long.

And .isPcsContinuos is false, so the CS deasserts after every frame.

Again, which version of the SDK/RTD drivers do you use?

 

BR, Daniel

0 项奖励
322 次查看
nxp84325
NXP Employee
NXP Employee

Hi Daniel,

I am working with Khulan on the same project. a Few questions:

- is the same limitation present on S32K312? I have tried to send more than 4096 bits per frame with K312 and saw the same issue. Also, based on driver source code, it seems the same mask is applied to the TCR (0xFFF --> 12 bits). So I guess it's same. (using RTD version 3.0.0)

- Concerning the S32K144, I have tried continuous mode. The problem is that PCS doesn't go back up at the end of the frame. Are we supposed to drive it manually? (using SDK 3.0.0)

 

thanks in advance.

0 项奖励
287 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @nxp84325 @Khulan,

I just sent you an email.

 

Regards,

Daniel

0 项奖励
331 次查看
Khulan
NXP Employee
NXP Employee

Hi Daniel,

We can confirm that our side that LSPI max framesize is 512 bytes. However we would need to support 1040 bytes payload.

We can use alternative to S32K144EVB as well S32K312EVB. Does S32K312EVB use also same LSPI and would have same frame size limitation? Which document can I look in the future to get that information as well

Otherwise we will further with continuous mode.

 

Thanks and best regards

Khulan

0 项奖励
378 次查看
Khulan
NXP Employee
NXP Employee

Hi,

 

I am using design studio version 3.5 with driver version S32SDK_S32K1XX_RTM_4.0.1.

 

Best regards

Khulan

0 项奖励