Question about MC9S12P64 COP watchdoge timeout rate.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Question about MC9S12P64 COP watchdoge timeout rate.

1,185 Views
Lucidfall
Contributor I

Hello This is Park, Byung-Woo from SL company in Korea.

 

I have a question about COP watchdog timeout rate

 

I use 16MHz XTAL, and I set CMPUCOP.CR register = 0x03.

According to table7-12.COP watchdog rats.  I can caculate COP watchdog timeout time is 163.84 ms (1/16MHz * 2^18)

 

I test watchdog timeout time using reset pin on MCU with Oscilloscope ,

The watchdog timeout time is 149.4 ms The difference is more than 10ms.

 

Can I know the reason? Thanks in advance.

 

16812_16812.pngscope_7.png

Labels (1)
0 Kudos
1 Reply

293 Views
iggi
NXP Employee
NXP Employee

Hi,

First of all the calculation seems to be wrong. There are 262144 cycles and one cycle is 0.0625us, so we get 262144*0.0625us = 16384us = 16.384ms.

It would be good the measure the clock as well. Are you sure the clock is 16MHz exactly? You can measure it on ECLK2X or ECLK (divided by 2) pins. Prior to that you would need to write the ECLKCTL register i.e. to clear the NECLK and/or NCLKX2 bits.

Find attached an example SW demonstrating COP watchdog with interrupt.

Also, you should disconnect the BDM line after programming.

Regards,

iggi

0 Kudos