FS85 SPI通信报错

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

FS85 SPI通信报错

411 Views
Ono12
Contributor I

你好,我移植了FS8x_S32K144_WatchdogExample这个demo中关于SPI读写FS85寄存器的部分,现在周期读取寄存器M_FLAG,deviceStatus=0xF0,readData = 0xF014.具体错误为

Wrong number of clock cycles (<32 or >32)和Error detected in the SPI CRC

CRC8用的也是DEMO提供的函数,为什么会报错呢?这两个错误该怎么解决呢?

读取寄存器FS_STATES,readData = 0x2003,没有找到03对应的状态机。

Labels (1)
0 Kudos
Reply
13 Replies

350 Views
Ono12
Contributor I

spi.png

如图,1是MOSI,2是CLK,3是CS,4是MISO。我读取了FS_DIAG_SAFETY寄存器,MOSI是0xA8,0x00,0x00,0xF2。MISO值是0xF0,0x04,0x29,0xD9。0xF2和0xD9是CRC值,跟我用CRC8工具计算的值是一样的。

另外,我不知道该怎么确认table100中的数值。

0 Kudos
Reply

406 Views
Ono12
Contributor I
SPI配置如下:时钟20Mhz,片选低有效,MSB传输,时钟空闲低电平,在时钟第二个边沿采样,SPI帧长度为32位,波特率为1000000
0 Kudos
Reply

388 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Xuxin,

If you have an oscilloscope or a logic analyzer, could you please share screenshots illustrating both SPI write and read transactions? Also please double check that all SPI timing requirements as shown in Table 100 of the datasheet are met.

BRs, Tomas 

0 Kudos
Reply

290 Views
Ono12
Contributor I
你好Tomas,

我更换了一片新的FS85芯片后,Wrong number of clock cycles (<32 or >32)和Error detected in the SPI CRC消失了。我在FS_STATES寄存器写入DBG_EXIT,但是读取寄存器FS_STATES,readData = 0x2003,并不是0x2006,这个03代表什么呢?怎样进入INIT_FS状态?
0 Kudos
Reply

280 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Xuxin,

Good to know that the original error disappeared. I am not aware of the fail-safe state machine state code of 0x03. It should be indeed 0x06. Could you please share a scope shot illustrating the read of the FS_STATES register?

BRs. Tomas

0 Kudos
Reply

263 Views
Ono12
Contributor I

你好,Tomas。

下面是我读取FS_STATES寄存器的SPI波形。1是CLK,2是CS,3是MOSI,4是MISO。我从波形解析到的MOSI是0xAC,00,00,F4,MISO是0x70,20,03,14。确实不是0x2006,这跟我一直在debug mode有关吗?

SPI_8510.png

0 Kudos
Reply

252 Views
CindyWen
NXP Employee
NXP Employee

Hello Xuxin

Could you clear these below bits by writing ‘1’  to these bits and see if the faults will be triggered again.  If these faults were triggered only when power on reset, we can ignore them, as they will not happen during the normal operation.  

CindyWen_0-1744702428974.png

 

Brs

Cindy Wen

 

0 Kudos
Reply

247 Views
Ono12
Contributor I

你好Cindy,

我按照你的建议,在M_FLAG对应位写1后又读取了如下寄存器,MISO返回数据如图,FS_STATS还是0x2003.

Ono12_0-1744706053734.png

 

0 Kudos
Reply

240 Views
CindyWen
NXP Employee
NXP Employee

Hi Xuxin

If FS state can not enter INIT_FS,I think the PGOOD/RSTB are not released due to some faults. 

Please check whether the PGOOD/RSTB are released to high or not?

If they are low, please check if there is OV/UV faults on board.

 

Brs

Cindy Wen

 

 

0 Kudos
Reply

232 Views
Ono12
Contributor I
你好Cindy,

我刚才请硬件工程师测量了PGOOD和RSTB引脚,两个都是低电平,硬件工程师说已经加了上拉电阻,但是没成功拉高。接下来需要软件配置什么寄存器吗?还是单纯的硬件问题?
0 Kudos
Reply

189 Views
CindyWen
NXP Employee
NXP Employee

Hi Xuxin

Please read the FS_OVUVREG_STATUS register.  Please check if VCOREMON is connected to BUCK1 output.  Check whether the VDDIO voltage is the  level defined by OTP.   Check whether VMON1~4 are 0.8V.

Which part number are you using? If you are using specific OTP defined by your company , please share the OTP file to me . 

 

Brs

Cindy Wen

0 Kudos
Reply

163 Views
Ono12
Contributor I

Hi Cindy,

我们的硬件工程师反馈Vcoremon悬空,VMON1-4悬空,具体型号为MC33FS8510D3ES。我读取

FS_OVUVREG_STATUS寄存器,结果为0x5550,如下图。接下来该排查什么?

Ono12_1-1744784466312.png

 

0 Kudos
Reply

108 Views
CindyWen
NXP Employee
NXP Employee

Hi xuxin

 

User should clear FS_OVUVREG_STATUS by writing all bits to '1',if the faults are triggered again, that is real OV UV fault. 

As in FS8510D3 OTP ,ABIST1 is assigned to all the monitors. So if VCOREMON or VMON1~4 reported UV, the   state machine is stuck at ABIST1 state, and can not go to INIT_FS state. 

VCOREMON should be connected to BUCK1, VMON1~4 should used to monitor regulators in your schematic. Please refer to the FS85 DEMO board.

Please contact local DISTI FAE for more help if debugging support is needed.

 

CindyWen_0-1744966686293.png

 

Brs

Cindy Wen

 

0 Kudos
Reply