javos65 / WDTZero

Allows to use the WatchDog functionality for Arduino Zero, MKRZero and MKR1000 only
15 stars 12 forks source link

Add Watchdog Cancel functionality #5

Closed mattb1969 closed 3 years ago

mattb1969 commented 4 years ago

Hi, For the project I am working on I have implemented functionality to turn the watchdog on and off. At the moment I have done it by simply calling setup with a valid time range and with zero, which is ok, but I wonder if it may be possible to implement something that sets up the watchdog, starts it and stops it? In this way, when I need to watchdog running, it can be started and stopped when no longer needed.

You maybe ask why I don’t have it running continuously, because I am trying to ensure minimum power consumption during sleep. The watchdog uses another clock, which I think is not the same clock as the RTC code and therefore consumes more power. Although please understand that I am not an expert when it comes to the clocks and their setup.

sprasadkrish commented 4 years ago

Hi Matthew Bennett WDTZero code shutdown the MKR1010 after 32 Second, I am looking to restart the MKR1010, what kind of changes we need to implement this code? To restart the MKR1010.

mattb1969 commented 4 years ago

Hi Sprasadkrish,

I’ve raised the above issue as a suggestion for a future improvement, I’m not a developer associated with this repository’s so the only advice I can offer is that if you take a good look at the examples you should be able to work it out.

sprasadkrish commented 4 years ago

Thank you for your immediate response , I will try as per your suggestion .

Thanks & Regards Prasad

On Fri, Aug 14, 2020 at 10:44 PM Matthew Bennett notifications@github.com wrote:

Hi Sprasadkrish,

I’ve raised the above issue as a suggestion for a future improvement, I’m not a developer associated with this repository’s so the only advice I can offer is that if you take a good look at the examples you should be able to work it out.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/javos65/WDTZero/issues/5#issuecomment-674175607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOFHQSU3NPSPYZIX3LKCQRLSAVWG3ANCNFSM4P4HGQIA .

javos65 commented 3 years ago

Hi Matthew Bennett WDTZero code shutdown the MKR1010 after 32 Second, I am looking to restart the MKR1010, what kind of changes we need to implement this code? To restart the MKR1010.

WDT does not shut down the processor, it gives it a hard reset, so it will restart (if your external processor conditions are ok)

Hi, For the project I am working on I have implemented functionality to turn the watchdog on and off. At the moment I have done it by simply calling setup with a valid time range and with zero, which is ok, but I wonder if it may be possible to implement something that sets up the watchdog, starts it and stops it? In this way, when I need to watchdog running, it can be started and stopped when no longer needed. You maybe ask why I don’t have it running continuously, because I am trying to ensure minimum power consumption during sleep. The watchdog uses another clock, which I think is not the same clock as the RTC code and therefore consumes more power. Although please understand that I am not an expert when it comes to the clocks and their setup.

I think its implemented with the call code WDT_OFF