Abnormal SPI data reception of s32k 144

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

Abnormal SPI data reception of s32k 144

207 Views
fengba
Contributor I

您好:

我在使用s32k144 spi功能时,发送数据正常,但是不能准确的从从机接收数据(从机是成熟的BMS采集芯片),我怀疑是发送数据的时序不对,我用逻辑分析仪采集了发送数据的波形,发现spi在发送数据时,每连续发送8个字节后,会间隔几个us左右再发送下一个4字节数据(我每一次发送的数据字节数是12字节)。

我使用的发送函数是SPI_MasterTransfer(&spiInstance,&Tx_Buf,&Rx_Buf,1);其中Tx_Buf 长度为12字节。

您能否帮助排查一下?

0 Kudos
Reply
3 Replies

174 Views
fengba
Contributor I

我发现lpspi 每发一个字节片选信号就拉高一个字节,没办法连续发送,导致从机无法有效接收到命令,这边有好的解决方案吗?

0 Kudos
Reply

118 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

那你应该要设置continuous transfer,请看一下这里的讨论:S32K14x: Command Word in LPSPI

由于资源有限,我们目前无法支持通过通用电子邮件帐户(例如 gmail.com 或 qq.com 或类似帐户)发信的客户。请确保您在与 NXP 沟通时使用公司电子邮件地址,以便我们能够相应地优先处理您的问题。感谢您的理解。


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

206 Views
fengba
Contributor I

示波器波形图如下:绿色为sck信号,8个连续时钟周期后,会间隔几us 进入下一个连续时钟周期

微信图片_20240626224645.jpg

0 Kudos
Reply