ts-7000
[Top] [All Lists]

[ts-7000] Re: program Wacth dog timer

To:
Subject: [ts-7000] Re: program Wacth dog timer
From: "PeterElliot" <>
Date: Wed, 26 Aug 2009 13:11:55 -0000
Hi,

Here's the code I use:

volatile char *WDOGctrl;
volatile char *WDOGfeed;

WDOGctrl=(char *) mmap(0,4096, PROT_READ|PROT_WRITE, MAP_SHARED, mem_fd, 
0x23800000);
if (WDOGctrl==MAP_FAILED) { perror("mmap 1"); return 0; }

WDOGfeed=(char *) mmap(0,4096, PROT_READ|PROT_WRITE, MAP_SHARED, mem_fd, 
0x23C00000);
if (WDOGctrl==MAP_FAILED) { perror("mmap 2"); return 0; }

// Set watchdog off...
WDOGfeed[0]=0x05;
WDOGctrl[0]=0x00;

// Set watchdog to 8 seconds...
WDOGfeed[0]=0x05;
WDOGctrl[0]=0x07;

// Release memory before exiting program.
munmap((void *)0x23800000,getpagesize());
munmap((void *)0x23C00000,getpagesize());



Hope this helps,

PJE



--- In  "arm.veeraiyan" <> wrote:
>
> Hi i am new to ARM 
> i am using TS-300 board with linux-2.4 
> 
> i want access watchdog timer like setting timer counter to some value to 
> reset the system after some seconds through c programming.......
> 
> 
> can any body help me how to do that........
> 
> 
> Thanks in advance
> 
> veeraiyan.c
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU