S12X system reboots twice

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

S12X system reboots twice

1,928 次查看
pittbull
Contributor III
Hello,
I use the following macro 'REBOOT()' to restart an S12X system which has a permanently running XGATE thread:

#define STOP_XGATE() {XGMCTL=0x2020; while(XGMCTL_XGDBG==0); XGCHID=0;}
#define REBOOT() {STOP_XGATE(); __asm sei; COPCTL = 0x41; ARMCOP = 0x01; for(;:smileywink:;}

The COP vector points to the startup code:
VECTOR ADDRESS 0xfffa _Startup

Most of the time it works, but sometimes the system restarts again (after one or two seconds). Could this be a problem with the macro above?

Thanks in advance,
pittbull
标签 (1)
0 项奖励
1 回复

418 次查看
pittbull
Contributor III
Hi again,
The problem is gone. Those macros were definitely *not* guilty :smileywink:
0 项奖励