Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11454
    rocketman
    Participant

    Many thanks for this great library.

    I’m using it with a solar panel powered pump controller with a ATMEGA328P UP on a proto board running with 8MHz internal clock source.

    I want to enable the WDT to trigger a reset if the MCU hangs due to low solar power
    Two questions:
    1. how to enable WDT reset functionality when using lowpower library
    2. will the WD trigger a reset when inside powerDown function?

    In brief this is the loop:
    loop() {
    // pump control code
    WDT reset if pump control code doesn’t complete in time
    // sleep – will the WD trigger a reset when inside powerDown function?
    LowPower.powerDown(SLEEP_1S, ADC_OFF, BOD_ON);
    }
    Thanks in advance for any pointers on this.

    #11568
    LIM PHANG MOH
    Keymaster

    The SLEEP_1S uses the WDT as a timer to wake up. When used as timer, the WDT cannot be used to reset the MCU when it hangs. The only way to do this is to SLEEP_FOREVER but uses other mechanism to wake up (example: external RTC) and but uses the WDT to reset instead.

    #11570
    rocketman
    Participant

    Thank you Lim Phang Moh for your clarification. I don’t have an external pulse to wake up from SLEEP_FOREVER – Could that be done with one of the inbuilt timers instead?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.