Core watchdog timer - M52259

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

Core watchdog timer - M52259

1,584件の閲覧回数
lel_chen
Contributor I

Hi,

 

OS : MQX 3.2
Controller : M52259

 

I am trying to use the core watchdog timer for MCF52259.
I have the following queries:
1) The timer interrupt flag always remains 1. The reference manual says that writing a 1 to this bit in CWCR register would clear the interrupt request.
The code used is as given below:
//disable the timer
MCF_SCM_CWCR &= 0x7F;
//service the timer
MCF_SCM_CWSR = 0x55;
MCF_SCM_CWSR = 0xAA;
//clear the interrupt request
MCF_SCM_CWCR = 0x01;
MCF_SCM_CWCR |= 0x01;

Both the statements above makes the value of CWCR to be 0x01. The interrupt request is not cleared.

How can I clear it?

 

2) The reference manual says a value of '010' for CWT in CWCR gives a timeperiod of 2^13 bus clock frequency. If the bus frequency is 48Mhz, what would be the timeout period?

Will it be time = (48*10^6) / (2^13) ?

 

Thanks,

Chen

ラベル(1)
0 件の賞賛
返信
1 返信

839件の閲覧回数
mjbcswitzerland
Specialist V

Hi Chen

 

I would suggest using the BWT (backup watchdog timer) when working with the M52259. This is an improved watchdog timer over the core watchdog timer, which has some deficiencies, making it not 100% reliable:

See the following for details http://www.utasker.com/forum/index.php?topic=505.0

 

Regards

 

Mark

 

www.uTasker.com
- OS, TCP/IP stack, USB, device drivers and simulator for M521X, M521XX, M5221X, M5222X, M5223X, M5225X. One package does them all - "Embedding it better..."

 

0 件の賞賛
返信