Question about MC9S12P64 COP watchdoge timeout rate.

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

Question about MC9S12P64 COP watchdoge timeout rate.

1,162 次查看
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

标签 (1)
0 项奖励
1 回复

270 次查看
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 项奖励