Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Watchdog

Watchdog

  • Please log in to reply
10 replies to this topic

#1 Riaan Mastenbroek

Riaan Mastenbroek

    Member

  • Members
  • PipPip
  • 19 posts

Posted 05 June 2015 - 07:00 AM

Hi,

 

I have a strange problem when running my Netduino. For some reason it seems like a thread to read smsses from my GPRS shield just hangs the board at any interval. It might run 2 hours or 30 mins but then it seems like all the threads just stops.

 

I have read some posts on watchdogs and more specifically the hardware watchdog.

 

Are there any available in the market to buy or what would you recommend. I would not like to put this at a client and have to reset the device every now and then.

 

Riaan



#2 phantomtypist

phantomtypist

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationNew York, NY

Posted 05 June 2015 - 02:33 PM

As it always is in electronics and software development, there are many solutions.

 

I personally use the Maxim DS1388 (http://www.maximinte...cks/DS1388.html).  You get an RTC, a watchdog timer, and also 512 bytes of EEPROM.  I use it religiously in all my projects.

 

You can find the driver (DS1388.cs) for it in one of my projects: https://bitbucket.or...tomtypist/ncmp/



#3 Riaan Mastenbroek

Riaan Mastenbroek

    Member

  • Members
  • PipPip
  • 19 posts

Posted 07 June 2015 - 06:21 AM

Hi,

 

Thanks for that. I also found this module - Have you used it / seen it before?

 

http://www.freetroni...le#.VXPigM-qpHx

 

Riaan



#4 Riaan Mastenbroek

Riaan Mastenbroek

    Member

  • Members
  • PipPip
  • 19 posts

Posted 24 June 2015 - 08:04 AM

Hi,

 

I looked at ordering but sitting in South Africa :( this is an expensive option for now. I looked at this thread:

 

http://forums.netdui...us/?hl=watchdog

 

Is there no way I can get the watchdog chip that is on the netduino to work? My netduino's will be running on a farm in a silo and difficult to come by - so I must somehow ensure it keeps running.

 

During testing it ran for 6 days straight but this morning stopped...so I had to manually hit the reset button and then it worked again.

 

This is my last hurdle and I am stuck. Any help please...

 

 

Riaan



#5 NameOfTheDragon

NameOfTheDragon

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationCanterbury, Kent, UK

Posted 12 August 2015 - 11:31 AM

Did you get to the bottom of your hanging Netduino? I wondered if you might be seeing the same problem I am... http://forums.netdui...e-minute-after/

 

I thought it was random until I started setting the time...



#6 dino4net

dino4net

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 17 August 2015 - 04:53 PM

I would love this feature too.

Currently use the MAX6371 chip.



#7 JoopC

JoopC

    Advanced Member

  • Members
  • PipPipPip
  • 148 posts

Posted 17 August 2015 - 07:36 PM

In cases that i work with network trafic or external sensors who i have my doubts in good working i set a reset timer, it works perfect for me.
 
when i sent some data over the internet i set a timer, I know i must have a answer in 50 secs so:

Dim resetTimer As Timer = New Timer(AddressOf reset, Nothing, 50000, Timeout.Infinite)

// everything ok so dispose at the end of your routine......
resetTimer.Dispose()


// the reset sub routine..
Private Sub reset()
PowerState.RebootDevice(False)
End Sub

Even when the Netduino hangs in the thread it will reset.
I know it is a workaround but still....

#8 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 18 August 2015 - 07:14 AM

Just wondering if using a Timer would work.  There is a problem in this thread where the interrupts do not trigger but the Timer continues.

 

Might have to test this...

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#9 JoopC

JoopC

    Advanced Member

  • Members
  • PipPipPip
  • 148 posts

Posted 18 August 2015 - 08:48 AM

In your example i can not see that the interrupt is cleared and the resistor mode must be pullUp in my opinion.

I have written a class with the PIR who works excellent for me. You can have a look at the class.
 
edit : I have attached a file but it will not upload
 
edit2 : Thread.sleep in your PIR example is not recommended.

here is a example:
http://we.tl/BS6jp2M4pl

#10 NameOfTheDragon

NameOfTheDragon

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationCanterbury, Kent, UK

Posted 18 August 2015 - 07:31 PM

Just wondering if using a Timer would work.  There is a problem in this thread where the interrupts do not trigger but the Timer continues.

 

Might have to test this...

 

Regards,

Mark

 

I've found that the timers are quite robust and they do seem to continue to work even when other stuff is deadlocked. I haven't had much luck with PowerState.RebootDevice() though.

 

What I do is strap a wire from one of the digital outputs to the /RESET pin, and drive it low in a timer callback. Here's the class I've been using:

https://bitbucket.or...g.cs?at=develop

 

It's part of my open source TA.NetMF.Utilities package:

Project home page: http://tigra-astronomy.com/open-source

Source code: https://bitbucket.or...netmf.utilities

Install from NuGet: Install-Package TA.NetMF.Utilities



#11 kerk-akker

kerk-akker

    Member

  • Members
  • PipPip
  • 12 posts
  • LocationNetherlands

Posted 01 March 2016 - 05:24 PM

Hi,

 

I developed my own HW watchdog ( separate PCB ). It simply plugs in between a Netduino and the power adaptor. It runs around a 4060 timer. In your code you need to add a function that gives a pulse around every 15 sec. In case there is no pulse the WD gives a reset pulse and in case that might not help it gives a power cycle on the netduino. I'm using it on all my sensitive netduino applications. Let me know if there is interest, then I can publish schema and PCB.

 

Br,

 

Arno







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.