[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

watchdog



Hi there, 

I've still problems with the watchdog-timer, I use following code:

****************************************
static byte watchdog_key = 0;

*R_VECT_MASK_SET = IO_STATE(R_VECT_MASK_SET, nmi, set);
*R_IRQ_MASK0_SET = IO_STATE(R_IRQ_MASK0_SET, watchdog_nmi, set);
// Start watchdog
__asm__ volatile ("SETF M"); // enable nmi by setting the M-flag
*R_WATCHDOG = 		
	IO_FIELD(R_WATCHDOG,key,watchdog_key) | 
	IO_STATE(R_WATCHDOG,enable,start); 
*****************************************

now the watchdog should call an NMI-interrupt, I catch this interrupt by

******************************************
// watchdog (NMI: interrupt 1) handler; SIGNMI = 1 !!!
signmi_handler.sa_handler=watchdog_handler;
sigemptyset(&signmi_handler.sa_mask);
signmi_handler.sa_flags=SA_RESTART|SA_NODEFER;
		
sigaction(SIGNMI,&signmi_handler,NULL);
*********************************************

but this interrupt-signal-handler is never be called and the board does NOT 
reboot after the 3.3ms!? Anyone an idea, or does anybody uses the watchdog 
and can send my a correct code sequence?
I enabled the timer with "make menuconf", use cris-1.11 and R1_0_2.

thx a lot

NKrug