Author Topic: How to achiveve 3Sec delay using watchdog timer  (Read 440 times)

0 Members and 1 Guest are viewing this topic.

Offline vishal

  • Regular Contributor
  • *
  • Posts: 102
  • Country: in
How to achiveve 3Sec delay using watchdog timer
« on: January 10, 2018, 04:25:27 pm »
Hi
    I have watchdog timer setup for 2.1 sec.
Code: [Select]

  WDTCSR=(1<<WDIE)|(1<<WDP2)|(1<<WDP1)|(1<<WDP0)

 
Is it possible to achieve 3 sec delay with watchdog timer.
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 1706
  • Country: fi
  • Embedded SW/HW.
Re: How to achiveve 3Sec delay using watchdog timer
« Reply #1 on: January 10, 2018, 06:39:00 pm »
Probably.
 

Offline bson

  • Supporter
  • ****
  • Posts: 1321
  • Country: us
Re: How to achiveve 3Sec delay using watchdog timer
« Reply #2 on: January 11, 2018, 03:14:46 am »
Is this an Arduino?  A quick google search seems to suggest its watchdog timer has a fourth prescaler bit.
 

Offline vishal

  • Regular Contributor
  • *
  • Posts: 102
  • Country: in
Re: How to achiveve 3Sec delay using watchdog timer
« Reply #3 on: January 11, 2018, 04:26:21 pm »
Is this an Arduino?  A quick google search seems to suggest its watchdog timer has a fourth prescaler bit.
NO i need it for avr-atmega256rfr2 MCU
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 1706
  • Country: fi
  • Embedded SW/HW.
Re: How to achiveve 3Sec delay using watchdog timer
« Reply #4 on: January 11, 2018, 08:28:18 pm »
Is this an Arduino?  A quick google search seems to suggest its watchdog timer has a fourth prescaler bit.
NO i need it for avr-atmega256rfr2 MCU

Check the atmega256rfr2 datasheet, and you will find out that you can get 2s or 4s watchdog periods [from the internal 128 kHz oscillator], but not 3s.
 

Offline MatthewEveritt

  • Supporter
  • ****
  • Posts: 136
  • Country: gb
Re: How to achiveve 3Sec delay using watchdog timer
« Reply #5 on: January 11, 2018, 08:48:53 pm »
You can of course use a 1s wdt interrupt and count to three.
 

Offline kathy45

  • Contributor
  • Banned!
  • Posts: 8
  • Country: bd
Re: How to achiveve 3Sec delay using watchdog timer
« Reply #6 on: January 15, 2018, 03:05:02 pm »
You can, after all, use a 1s wdt interrupt and count to 3.
Kathy
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf