correct way to send signal to an external watchdogtimer IC

Hello,

As I can't get my internal WDT timer to work (on a Mega 2560, tried it the last year :frowning:
, 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.

(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.

Grumpy_Mike:
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.

Hi
as far as I know, external WDT chips are the better solution wrt SW based solutions (any application based incl. state engine) and TPS382 series very common..

as far as I know, external WDT chips are the better solution wrt SW based solutions

Any reason for that belief? Or are you just guessing. I have used both, in fact I "invented*" a hardware watch dog in the mid 70's and there is no difference between them.

  • By invented, I mean I thought of the idea myself and implemented it in an embedded processor system. It was patented by someone else about a year later.

Hi
it is not guessing.. By the way, currently Im using both of depending on how critical project is.. the reasons are:

  1. there are many warnings in the forums for usage of wdt of Atmel.. you can easly brick the chip
    a) very short trigeer time (intentionally or unintentionally)
    b) a warnıng from ATmel docs says that you may overwrite wdt registers (accidentally) so that un expected results

  2. At the end of the day, if you facing any problem with wdt, just have to remove the line btwn reset pin and wst

  3. Having completely independent IC is much more safer to avoid any SW "mistakes" or supply problems

I have some devices which is either being installed either very far away or mission critical .. In this case I prefer seperate IC.. for, my personal opinion is to use external one.. but certainly, it is personal opinion..

ps. sorry for late response, just seen your reply