COP reset

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

COP reset

4,069 次查看
tyson
Contributor I
Hi all,
is there any Application Notes on the COP(Computer Operating Properly) for MC9S12NE64?
 
i'm aware that by writing to COPCTL register, watchdog is enabled and writing  ARMCOP = 0x55;
 ARMCOP = 0xAA;
will restart the watch dog.
 
i have a set of queries for COP:-
 
1. Is there any bit indication, which tells me wheter the Reset happened due to Watch dog(COP) or due to some other reasons.
 
2. I'm installing a COP ISR (vector 2). but, on watch dog getting fired, it is not coming to the ISR. But, the system is getting reset.
 
 
please help me out of this.
 
Thanks
 
标签 (1)
0 项奖励
回复
2 回复数

1,354 次查看
Nabla69
Contributor V
Hi Tyson,
 
Well your 2. answers your 1.
If the COP vector is fetched it's because you've got a COP Reset. (p°90 datasheet v4). It's a dedicated vector.
 
If you don't take the ISR you declared may be it is overridden somewhere else. (like double declared)
Check in the vector table in the debugger that you have the address of the ISR you want to be executed.
 
COP is a RESET, not a normal ISR.
 
Cheers,
Alvin.
 
0 项奖励
回复

1,354 次查看
AndroTec
Contributor I
Hi,

I have the same problem: COP is configured and working, but if it fires, the "normal" reset is executed.

My *.PRM file contains:
VECTOR 0 _Startup /* reset vector*/
VECTOR 2 _COPStartup /* COP reset vector: called when watchdog has triggered */

Via debugger I see:
00FFF8 FF FF C0 19 FF FF C0 00

0xC019 is the address of _COPStartup(), 0xC000 points to _Startup()

So far so good, but _COPStartup() is never executed. In case of a watchdog timeout, the CPU restarts with _Startup() instead of _COPStartup().

What goes wrong??

Thanks in advance!!
0 项奖励
回复