Hello.
I’m having trouble putting my mDot to sleep/waking from sleep. I’m using code from the Dot-Examples project (dot-util files) in my own project, and none of the sleep functions from dot-util.cpp seem to work.
I first tried sleep_wake_rtc_only (deepsleep = false, delay_s = 10) – sleep_save_io executes ok, but sleep_configure_io doesn’t seem to pass (controller just hangs and never gets to my debug comment after that line of code).
Next I tried sleep_wake_rtc_or_interrupt – not only did it not wakeup after 10 seconds using RTC, but dot->setWakePin() doesn’t seem to work as well… getWakePin always returns DI8. For example:
dot->setWakePin(XBEE_DIO7);
logInfo("interrupt on %s pin", mDot::pinName2Str(dot->getWakePin()).c_str());
prints DI8 instead of DIO7. And using a PPS signal on DI8/DIO7 to try to wake the mDot from sleep also doesn’t work. In another topic I read that grounding PA_0 might help, but the code below seems to have no effect:
DigitalOut wakePin(PA_0);
wakePin = 0;
sleep_wake_rtc_or_interrupt(sec, false);
I’m out of ideas and didn’t find this problem on the forum, so I hope someone here can shed some light on this weird behavior.
I’m using libmDot-mbed5 3.0.0 (revision 62:225e2dd) and mbed-os 5.4.7 (2996:fc18365). Also I have a Timer object that I use in my project’s main code – can this affect the RTC behavior?
-
This topic was modified 3 hours, 56 minutes ago by
Mark Makarychev.
-
This topic was modified 3 hours, 54 minutes ago by
Mark Makarychev.
-
This topic was modified 3 hours, 54 minutes ago by
Mark Makarychev.