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

0 Members and 1 Guest are viewing this topic.

Offline vishalTopic starter

  • Regular Contributor
  • *
  • Posts: 102
  • Country: in
How to achiveve 3Sec delay using watchdog timer
« on: January 10, 2018, 05:25:27 am »
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: 2145
  • Country: fi
  • Embedded SW/HW.
Re: How to achiveve 3Sec delay using watchdog timer
« Reply #1 on: January 10, 2018, 07:39:00 am »
Probably.
 

Offline bson

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

Offline vishalTopic starter

  • Regular Contributor
  • *
  • Posts: 102
  • Country: in
Re: How to achiveve 3Sec delay using watchdog timer
« Reply #3 on: January 11, 2018, 05:26:21 am »
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: 2145
  • Country: fi
  • Embedded SW/HW.
Re: How to achiveve 3Sec delay using watchdog timer
« Reply #4 on: January 11, 2018, 09:28:18 am »
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, 09:48:53 am »
You can of course use a 1s wdt interrupt and count to three.
 

Offline kathy45

  • Newbie
  • !
  • Posts: 8
  • Country: bd
Re: How to achiveve 3Sec delay using watchdog timer
« Reply #6 on: January 15, 2018, 04:05:02 am »
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