This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

我想使用 WDT 準確一秒運算(節約電力使用)!

如題所言:

因為 RTC 無法在休眠使用運算時間,所以我想使 WDT 運算 年/月/日/小時/分/秒 (這時間必須在一個月都是準的),每一秒我會做一些運算當我運算完成之後我會休眠,讓WDT 再產生中斷喚醒累計 年/月/日/小時/分/秒 ,每次中斷我希望 MCU 能清除 WDT 或者重新再入 WDT ,我並不希望 MCU RESET 這怕會影響其他運算, 影響其他運算的準確性使得我的產品產生不可預期性錯誤,請問我該如何做這段程式會是最好,我嘗試了 Sample code WDT 部分都會 RESET 不能中斷清除讓我正常運算。

Parents
  • You may want to translate your question to English in order to get more help/feedback from this forum.

    I think the main purpose of the watchdog timer (WDT) is to reset the mcu when it expires and not to use it as a timer; I may be wrong here.

    What issue did you run into with the 32kHz clock again? I believe lots of folks have done the 1-second timer thing here using the RTC.

Reply
  • You may want to translate your question to English in order to get more help/feedback from this forum.

    I think the main purpose of the watchdog timer (WDT) is to reset the mcu when it expires and not to use it as a timer; I may be wrong here.

    What issue did you run into with the 32kHz clock again? I believe lots of folks have done the 1-second timer thing here using the RTC.

Children
No Data
Related