I have some problems on the reset vector of mc9s12hy64, oscillator monitor and cop watchdog

cancel
Showing results for 
Search instead for 
Did you mean: 

I have some problems on the reset vector of mc9s12hy64, oscillator monitor and cop watchdog

286 Views
hongjianzhang
Contributor III

Today I found  a book said that we can set some vector process function to do user settings, and then I began to use some vectors, and I wrote a oscillator vector process function and watchdog vector process function, but when a watchdog reset happens, the mcu just reset and didn't go into the function, and when my oscillator was disturbed by outside electromagnetic ,I thought that the mcu may reset ,and the source is oscillator monitor interrupt, but it also reset,and didn't go into my process.

 

I wonder if the process is valid ,and I also want to write a vector of all of reset to debug our program to find out the source of reset, Does this practicable ?

Labels (1)
0 Kudos
1 Reply

55 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

COP recognition and principles are described in

S12 FAMILY DEVICES COP RECOGNITION CONSIDERATIONS_v2.0.pdf 

S12 FAMILY DEVICES COP RECOGNITION CONSIDERATIONS - calculator.xlsx 

As a  development platform I can provide you code for different MCU but principle and code is the same. (attached)

I see your issue in COP recognition (capacitor on reset pin) and probably usage of local variable in the COP subroutine (the variable can be placed onto stack by compiler and after reset there is no stack initialized.

Note, the S12P (used in example) has the same reset timing as S12HY. I mention it because S12HY is not mentioned in the documents I presented above.

Best regards,

Ladislav

0 Kudos