Pages: [1]   Go Down
Author Topic: correct way to send signal to an external watchdogtimer IC  (Read 452 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,


As I can't get my internal WDT timer to work (on a Mega 2560, tried it the last year :-(
, I've connected a external WDT (tps3823).

So, what i like to know is how to forsee from an arduino a signal (0 to 1 or 1 to 0) every 100 msec to this WDT.
I've tried an alarm already (to pit a digital output L and H every x time), but this is not fast enought in my havy (as you can read in the explantation at the end of this topic) main program.

So can anyone share with me how he would connect the arduino to the wdt (so the arduino will forsee a continous signal when its working) and stops this continue signal when he crashes ?

For your information, this is my hardware implementatie:

I've run the last half year the following configuration:

Base station:
- Arduino mega2560 official arduino shield
- official SD card and ethernet shield
- LCD monitor (2x16 chars)
- RFM12 tranceiver
- DS1820 temperature sensor
--> master that logs the power / temperature from the slave(s) and also acts as a PID temperature regulator (for controlling the heaters). It acts also as a webserver:
- when request on client windows, it can send over the .csv logged file to the pc or delete it on the SD
- when rquest , it can send to the client pc a status page of the base station
- sets the time (via ntp)

Slave: jeenode with CT sensor (for power), based on openenergy 3.0 software + DSB1820 temperature sensor

On my pc, I use the emoncms database. Every day a task gets the csv file (from base station over ethernet), convert it to emoncms rows and insert the new entries in emoncms. I also have written some graphs in JPgraph to follow my energy use.

My experience with several devices on the same SPI bus:
when accessing the ethernet device (fe. send over a 30 MB csv file to the client pc), the mega hangs when receiving on the same time a RF pakkage. (it rarely happen, once a month), but is annoying. As it is a Mega2560, the internal WDT won't work and there are no alternative bootloaders yet available.

Best regards,
Jeroen.

Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33374
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
(so the arduino will forsee a continous signal when its working) and stops this continue signal when he crashes ?
That is the trick with a watchdog and there is no way of guaranteeing it will stop if the program crashes. I have known many systems that crash but the watchdog is still being kicked.

Perhaps the best way it to implement your program as a state machine and have a kick as one of the event driven tasks from the millis() counter.
Logged

Pages: [1]   Go Up
Jump to: