Skip to contentSkip to conversation

About watch dog timer limit of CPU (Xscale ->IXP425) How can I set more long time ?

DISCUSSION Bob Zhang 1 participant 1 message Dec 5, 2006

lore
Share & tools
lore

Bob Zhang

author
#0 lore raw

Hello all ,

My embeded board hardware configuration is like this :

# cat /proc/cpuinfo
Processor       : XScale-IXP425/IXC1100 rev 1 (v5b)
BogoMIPS        : 266.24
Features        : swp half thumb fastmult edsp 

Hardware : Intel IXDP425 Development Platform
Revision : 0000
Serial : 0000000000000000

Through reading datasheet of ixp4xx ,I know it has own watchdog functions , please see attchment :15 Timer

I find a driver by goole ,
see attachment .

Watchdog timer counter is 32 bit register , its max value is 2<<32 -1

#define TIMER_FREQ 66000000 /* 66 MHZ timer */ #define TIMER_KEY 0x482e
#define TIMER_MARGIN 60 /* (secs) Default is 1 minute */ //I want to modify it ,I find its max value is 65

static int ixp425_margin = TIMER_MARGIN; /* in seconds */ static int ixp425wdt_users;
//static int pre_margin; //IXP425 CPU 's watch dog timer is 32 bit , //so I define it to be unsigned int --bob
static unsigned int pre_margin;
pre_margin = TIMER_FREQ * TIMER_MARGIN
*IXP425_OSWT = pre_margin;

if I need one minutes ,
*IXP425_OSWT = 66000000 * 60 = 396000000 ,not overflow

if I need two minutes ,
*IXP425_OSWT = 66000000 * 120 = 792000000 ( which has been > 2<<32-1 , overflow

So I compute the max time I can set :
T_max = 2<<32-1 / 66000000 = 65 seconds ¡£

--------------------
My question:

if need more seconds ( for example , 5 minutes ) ,what should I do ?

I have a method based on datasheet (ixp4xx) ,but I don't know if it will successed when system crash

How can I do to break the limit of hardware ?
Thanks ahead !

--
Best Regards
bob