bugAVR C Runtime Library - Bugs: bug #45420, avr/wdt.h: Allow enabling watchdog...

 
 

bug #45420: avr/wdt.h: Allow enabling watchdog in interrupt mode

Submitted by:  Matthijs Kooijman <matthijs>
Submitted on:  Fri 26 Jun 2015 07:29:48 PM UTC  
 
Category: HeaderSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Header files
Status: NonePercent Complete: 0%
Assigned to: NoneOpen/Closed: Open
Release: AnyFixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 26 Jun 2015 07:29:48 PM UTC, original submission:

wdt.h provides a wdt_enable() function, which conveniently abstracts enabling the watchdog and setting the timeout at the same time.

A similarly easy way to enable interrupt (and probably also interrupt + reset) mode would be a useful addition.

I'm not sure how this API would look. This could be a a function wdt_enable_interrupt() and wdt_enable_reset_and_interrupt() to set the timeout and enable just the interrupt or both reset and the interrupt (function names would need some work).

Alternatively, having a separate function to set the timeout and one to enable (just) the interrupt mask (which I think doesn't require the WDCE dance) would also work, then thos can be combined for interrupt-only mode, and wdt_enable with the enable interrupt mask function would enable system+reset.

Matthijs Kooijman <matthijs>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by matthijs (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1