AnsweredAssumed Answered

Reset on watch dog timer expires

Question asked by Abhijit Khadtare on Aug 8, 2009
Latest reply on Sep 10, 2009 by Terry Tyndall

Hi all,
I hv MCF52233DEMO board in which i want to use watch dog timer to reset the program after watch
dog timer expires.
/******* from main.c ********************/
MCF_INTC0_IMRL &= ~( MCF_INTC_IPRL_INT8 | 1 ); // Enable Irq 8 (bit 0 should allways be 0)

MCF_INTC0_ICR07=MCF_INTC_ICR_IL(4);

MCF_SCM_CWCR = MCF_SCM_CWCR_CWE | // Enable WDT
//MCF_SCM_CWCR_CWT(1) | // 2^19 bus cycles.
MCF_SCM_CWCR_CWT_2_23 |
MCF_SCM_CWCR_CWTA | // Enable Transfer Ack.
MCF_SCM_CWCR_CWTAVAL ;

/************** exception.c *************/

__interrupt__ void wdtISR( void )
{

MCF_SCM_CWCR |=MCF_SCM_CWCR_CWTAVAL |MCF_SCM_CWCR_CWTIF ;
MCF_RCM_RCR |= MCF_RCM_RCR_SOFTRST; // Set software reset request bit.
}

and also add entry in vetor table at 72 i.e. 64+8

but rather than program reset program stop executing.
Is i miss something or any flaw to set the values??
Plz help me out.

Outcomes