Question about MC9S12P64 COP watchdoge timeout rate.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Question about MC9S12P64 COP watchdoge timeout rate.

1,355件の閲覧回数
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 返信

463件の閲覧回数
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 件の賞賛
返信