|
I am using the above development board for my project. I am trying to add a COP vector in my program in order to recover when the program "hang". I had enabled the COP system by storing hexa $0B into CONFIG register($103F) using EEPROM burning method.I had also defined the COP failure vector and selected timeout period through OPTION register and reset the COP timer regularly through COPRST register. I had tried to check whether the COP system would function properly by didn't reset the COP timer.But, the program can't jump to address given by COP failure vector when the program "hang". Why? I had set up the COP vector with following instructions: ORG $00FA JMP RECOVER RECOVER is my starting address when the COP timer timeout and the program is running under BUFFALO monitor. Can any one show me how to set up the COP system in the microcontroller? I will appreciate if you can show me a simplest program (in assembly language) that can jump to COP failure vector address. Thank you for your information Regards, chonchet |
|
|
|
Hi Conchet, What you are trying to do is place an instruction (JMP Recover) into the vector location. What has to go there is an address pointing to the recover routine. This can be done simply by the following. ORG $00FA FDB RECOVER This will define a 16 bit address in location FA. Then assemble the program again and execute. For normal processor operation, the vector needs to be placed at address $FFFA when not running under a debugger. I am assuming that this is why you are trying to place the vector at $FA. Regards, Ian >>> 23/06/2004 2:36:38 pm >>> I am using the above development board for my project. I am trying to add a COP vector in my program in order to recover when the program "hang". I had enabled the COP system by storing hexa $0B into CONFIG register($103F) using EEPROM burning method.I had also defined the COP failure vector and selected timeout period through OPTION register and reset the COP timer regularly through COPRST register. I had tried to check whether the COP system would function properly by didn't reset the COP timer.But, the program can't jump to address given by COP failure vector when the program "hang". Why? I had set up the COP vector with following instructions: ORG $00FA JMP RECOVER RECOVER is my starting address when the COP timer timeout and the program is running under BUFFALO monitor. Can any one show me how to set up the COP system in the microcontroller? I will appreciate if you can show me a simplest program (in assembly language) that can jump to COP failure vector address. Thank you for your information Regards, chonchet Yahoo! Groups Links [Non-text portions of this message have been removed] |