mdot os5 example questions.
- This topic has 4 replies, 3 voices, and was last updated 9 years ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Tagged: mdot deep sleep mode.
1) Since the deep sleep mode no longer exists, looking at the new dot examples, I see that following calls in dot_util.cpp are made in the non-deep sleep mode scenario. Should I be doing the same or the latest mdot library handles this internally when the mdot sleeps in non deep sleep mode. Since I would be using SPI and couple of the GPIO pins.
if (! deepsleep) {
// save the GPIO state.
sleep_save_io();
// configure GPIOs for lowest current
sleep_configure_io();
}
// go to sleep/deepsleep for delay_s seconds and wake using the RTC alarm
dot->sleep(delay_s, mDot::RTC_ALARM, false);
if (! deepsleep) {
// restore the GPIO state.
sleep_restore_io();
}
Thanks,
Yogesh
Hi Yogesh,
Its not completely accurate to say there is no deep sleep. You can still invoke both sleep and deep sleep. All the internal IO are taken care of in both sleep modes. Deep sleep additionally handles external IO. For a more detailed explanation, see the ‘Deepsleep functionality change’ explanation found at the following link:
https://developer.mbed.org/platforms/MTS-mDot-F411/
Kind regards,
Leon
Thanks Leon for taking the time to respond.
I was wondering if I could get some clarifications regarding running i the deep sleep mode.
I run additional threads in my application and during the deep sleep mode, are these threads suspended and re-started on wake up or do I need to re-start it again?
Since the memory is kept intact in the new deep sleep mode, I am assuming the additional thread stack stays intact as well?
Thanks,
Ajay
Hi Ajay,
That’s what I would expect. Other than what it does with the external IO, it will work the same as sleep mode. The processor goes into stop mode not standby mode.
Kind regards,
Leon