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

RE: init 6 ?, RE: watchdog



Hi Nikolaus and Sebastian,
the RTC-driver (os/linux/arch/cris/drivers/ds1302.c) seems to do something that disables the watchdog. This is a bug of course and I will come up with a solution as soon as possible. The fix for now is to disable the RTC-driver.

Best regards
/Jonas

> -----Original Message-----
> From: Sebastian Andersson [mailto:sa@xxxxxxx.net]
> Sent: Friday, May 11, 2001 9:00 AM
> To: dev-etrax@xxxxxxx.com
> Subject: init 6 ?
> 
> 
> init 6 doesn't seem to work on ETRAX 100LX for me.
> init kill all processes, then print *** HARD RESET ***, but nothing
> else happens.
> 
> Any other way to reset the board?
> 
> Regards,
> /Sebastian
>

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