FS6500 execute FS65_WD_Refresh() and enters ResetHandle.

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

FS6500 execute FS65_WD_Refresh() and enters ResetHandle.

跳至解决方案
643 次查看
Wangfangyuanx
Contributor I

I referred to the Demo program on the official website(Embedded SW: FS65/FS45 SW Driver | NXP Semiconductors) and ported it to the S32K314 MCU. In the chip initialization function, whenever the FS65_WD_Refresh() function is executed, the MCU resets directly. I measured the RESTB pin and found that whenever the FS65_WD_Refresh() function is executed, the RSTB pin sends a low-level pulse of 10ms. But isn't this function supposed to be a watchdog feeding operation? Why does it perform a reset operation?

PixPin_2025-06-03_14-45-14.png

0 项奖励
回复
1 解答
590 次查看
guoweisun
NXP TechSupport
NXP TechSupport

---上电读到MODE 为 Normal mode。请问这是什么原因,读取MODE寄存器之前是否还需要进行其他的操作?

---

一开始上电就是初始化阶段不可能是normal模式的。

12.1.6 Normal
In this mode, all device functions are available. This mode is entered by a SPI command from the INIT phase by writing in the INIT_INT register. While in normal mode, the device can be set to low-power mode (LPOFF) using secured SPI command.

读取MODE寄存器是让你了解SBC在哪个阶段,不是什么特殊的步骤

在原帖中查看解决方案

0 项奖励
回复
5 回复数
641 次查看
guoweisun
NXP TechSupport
NXP TechSupport

Hi 

在初始化阶段配置好相关的INIT的寄存器以后需要在256ms以内刷新一次WD,看下面的例子:

guoweisun_0-1748934020826.png

 

0 项奖励
回复
633 次查看
Wangfangyuanx
Contributor I
该如何修改代码呢,这块驱动代码是移植的官网的 S6500/FS4500 Generic SW Driver with Examples 这个Demo,从代码上看INIT相关的的寄存器是在 FS65_Init()函数中进行配置,在FS65_Init()函数的最后执行了FS65_WD_Refresh();这期间应该是在256ms之内的
0 项奖励
回复
620 次查看
guoweisun
NXP TechSupport
NXP TechSupport

假如您执行了配置Init寄存器,然后也在256ms刷新了WD他就会自

动进入normal模式。

这时候需要您正常的喂狗,喂狗错误一样会出问题

或者您在INIT 的阶段把WD disable掉看看有什么发生。操作WD_WINDOW寄存器

guoweisun_0-1748936445242.png

 

0 项奖励
回复
606 次查看
Wangfangyuanx
Contributor I

如您所说,把WD disable 之后,回读WD_WINDOW 结果为0x03(默认值),后看了代码发现应该是没有配置INIT和 WD相关寄存器,却执行FS65_WD_Refresh() 导致的异常复位。通过分析Demo 代码可以看出,上电后首先读取 MODE 寄存器获取当前MODE,如果返回是 INIT mode才会对INIT 和WD相关寄存器进行配置。从Debug仿真结果来看,上电读到MODE 为 Normal mode。请问这是什么原因,读取MODE寄存器之前是否还需要进行其他的操作?

FS65_Init.pngFS65_GetMode.png

0 项奖励
回复
591 次查看
guoweisun
NXP TechSupport
NXP TechSupport

---上电读到MODE 为 Normal mode。请问这是什么原因,读取MODE寄存器之前是否还需要进行其他的操作?

---

一开始上电就是初始化阶段不可能是normal模式的。

12.1.6 Normal
In this mode, all device functions are available. This mode is entered by a SPI command from the INIT phase by writing in the INIT_INT register. While in normal mode, the device can be set to low-power mode (LPOFF) using secured SPI command.

读取MODE寄存器是让你了解SBC在哪个阶段,不是什么特殊的步骤

0 项奖励
回复