ts-7000
[Top] [All Lists]

Re: [ts-7000] watchdog configiration issues in ts7500

To:
Subject: Re: [ts-7000] watchdog configiration issues in ts7500
From: walter marvin <>
Date: Mon, 27 Jun 2011 05:15:14 -0700 (PDT)


look at the source code for tS7500ctl from Texhnologic. Be warned. there is an error in the code somewhere.

--- On Mon, 6/27/11, ramandeep <> wrote:

From: ramandeep <>
Subject: [ts-7000] watchdog configiration issues in ts7500
To:
Date: Monday, June 27, 2011, 7:03 AM

 


Hi,

I am trying to configure the watchdog in TS7500 to achieve the following:

1) Automatically reboot the board if the app hangs.

2) Reboot the board if the application gets killed and stops at command line/shell prompt.

The first requirement is satisfied but somehow the watchdog doesnt time out if I kill the application from the console.Even when I exit from the application after some iterations of watchdog feed the results are the same.The board just stops at command line.Any ideas what could be wrong here?
The code is as below:
//////////////////////////////////

#include <time.h>
#include <stdio.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <ctype.h>
#include <linux/rtc.h>
#include <sys/time.h>
#include <sys/types.h>
#include <string.h>
#include <ctype.h>
#include <pthread.h>

#include "sbus.h"
#include "termios.h"
#include "fcntl.h"
#include "stdlib.h"
#include "malloc.h"

int main(int argc, char **argv)
{

unsigned char iii=0;
///initialize watchdog
system("ts7500ctl -W");
printf("\n watchdog init \n");

///set autofeed interval for watchdog

/*
0x74: Watchdog feed register (write only)
write value 0x0: feed watchdog for another .338s (approx)
write value 0x1: feed watchdog for another 2.706s (approx)
write value 0x2: feed watchdog for another 10.824 (approx)
write value 0x3: disable watchdog
*/
sbuslock();
sbus_poke16(0x74,1);
sbusunlock();

for(iii=0;iii<50;iii++)
{
sleep(1);
sbuslock();
sbus_poke16(0x74,1);
sbusunlock();
printf("\n feeding watchdog = %d\n",iii);
printf("\n in while \n");
}

exit(0);
///exiting from app here back to shell prompt...hoping for watchdog to timeout and reboot the board
}

////////////////////////////////////////////

Thanks,
Ramandeep



__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<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