S32K1系列是否能通过某个寄存器或通过什么软件手段来判断并确认SPI故障?

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

S32K1系列是否能通过某个寄存器或通过什么软件手段来判断并确认SPI故障?

995 Views
GAC-Lamp-Knight
Contributor II

我有个需求,需要通过软件的方式来判断并确认SPI物理层已经故障。可以通过什么手段来实现?请帮忙提供可以参考的方案,如果有可运行用于验证的demo code更佳,如果没有请帮忙分析该思路是否可以用贵司芯片实现?#S32K118

Tags (3)
0 Kudos
Reply
3 Replies

973 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @GAC-Lamp-Knight,

The SPI driver does not support hardware errors for the MOSI/MISO lines shorted to BAT, GND or open, but included int he SPI MCAL driver is the following reference:

Julin_AragnM_1-1723572001774.png

 

Which could be used as SPI clock physical error.

Best regards,

Julián

0 Kudos
Reply

956 Views
GAC-Lamp-Knight
Contributor II

SPI_MasterTransferBlocking(&spi1Instance, buf, pOutData, SPI_Frames_Size, TIME_OUT_2MS);我调用得是这个API,启用了DMA;但是不知道通过什么方式可以了解到它是超时没有接收和发送完整得帧数据。
0 Kudos
Reply

939 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @GAC-Lamp-Knight,

You can use the following community post as reference: Solved: S32K DMA and SPI - NXP Community. There is also this application note: AN12972.

Best regards,
Julián

 

0 Kudos
Reply