公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
SHUAI
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked
unsigned long i; unsigned short passwd; passwd = IfxScuWdt_getSafetyWatchdogPassword(); IfxScuWdt_clearSafetyEndinit(passwd); SCU_RSTCON.B.SW = 1; for(i=0;i<5000;i++){}; SCU_SWRSTCON.B.SWRSTREQ = 1; IfxScuWdt_setSafetyEndinit(passwd);
0 点赞
4 回复数
harvis
Level 5
Level 5
10 solutions authored First like received First like given
代码逻辑没什么问题,问题应该在时序上面。for循环会有延时,可能会导致SafetyWatchdog复位或者超时。可以把for循环注释掉试试。
0 点赞
我叨叨叨叨叨叨
Level 1
改成这样 unsigned long i; unsigned short passwd; passwd = IfxScuWdt_getSafetyWatchdogPassword(); IfxScuWdt_clearSafetyEndinit(passwd); SCU_RSTCON.B.SW = 1; IfxScuWdt_setSafetyEndinit(passwd); for(i=0;i<5000;i++) { } IfxScuWdt_clearSafetyEndinit(passwd); SCU_SWRSTCON.B.SWRSTREQ = 1; IfxScuWdt_setSafetyEndinit(passwd);
0 点赞
我叨叨叨叨叨叨
Level 1
SCU_SWRSTCON.B.SWRSTREQ = 1; 1. 你都发system reset请求了, 在线调试能好用么(我没用过,不太清楚) 2. 建议在SCU_SWRSTCON.B.SWRSTREQ = 1;之后加入下面语句,用于等待soft reset while(1);
0 点赞
我叨叨叨叨叨叨
Level 1
SCU_SWRSTCON.B.SWRSTREQ = 1; 1. 你都发system reset请求了, 在线调试能好用么(我没用过,不太清楚) 2. 建议在SCU_SWRSTCON.B.SWRSTREQ = 1;之后加入下面语句,用于等待soft reset while(1);
0 点赞