MDot Deep Sleep RAM status?
Tagged: MDot Deep Sleep, RAM
- This topic has 3 replies, 2 voices, and was last updated 4 years, 9 months ago by Jason Reiss.
-
AuthorPosts
-
February 17, 2020 at 4:37 pm #30286Ajay KParticipant
In the MDot examples on the site : https://os.mbed.com/teams/MultiTech/code/Dot-Examples//file/76f8a75ed3ec/examples/src/auto_ota_example.cpp/ I see the following comments mentioned below.
// deepsleep consumes slightly less current than sleep // in sleep mode, IO state is maintained, RAM is retained, and application will resume after waking up // in deepsleep mode, IOs float, RAM is lost, and application will start from beginning after waking up // if deep_sleep == true, device will enter deepsleep mode
However when you do put the mdot in deepsleep mode, the following logs are generated, and so I am not sure is it even possible to put the mdot in deep sleep mode and if so is the RAM retained or not?
2/14/2020 11:24:39 AM: [WARNING] This mDot hardware version does not support deep sleep… using sleep.
2/14/2020 11:24:39 AM: [DEBUG] Session saved to flash
2/14/2020 11:24:39 AM: [DEBUG] ULC: 19
2/14/2020 11:24:39 AM: [DEBUG] DLC: 19
2/14/2020 11:24:39 AM: [TRACE] Removed old session file
2/14/2020 11:24:39 AM: [ERROR] SPIFFS_remove failed -10002
2/14/2020 11:24:39 AM: [INFO] Read protected file
2/14/2020 11:24:39 AM: [DEBUG] wrote 256 bytes
2/14/2020 11:24:39 AM: [DEBUG] file size: 256 bytes
2/14/2020 11:25:36 AM: [TRACE] configuring RTC Alarm A to wakeup 60000 milliseconds from now
Thanks,
Ajay.February 19, 2020 at 8:36 am #30292Jason ReissKeymasterPlease see the “Deepsleep functionality change” section.
https://os.mbed.com/platforms/MTS-mDot-F411/February 19, 2020 at 6:09 pm #30300Ajay KParticipantThanks Jason I did read that and I was confused because of the examples still calling out regarding deep sleep. We are planning to start using the latest libmdot5 version and I was looking at the examples to see if anything has changed in the way we connect to the gateway.
Also in the deep sleep the following was called out based on your link above:
Under the hood, sleep and deep sleep now function the same with the exception of how the external IO are handled.
Deep sleep mode: When entering deep sleep, external pin configurations are saved and all external IO are configured as analog input with no pull resistors. This achieves lowest power consumption while mimicking how IO are configured in standby mode. Upon wake, pin configurations are restored. If having all external IO pins floating works in your installation, this mode is recommended.Currently in our code base we have implemented the following when the MDot boots up, do we need to do this anymore in the deep sleep mode?
//first thing you do is initialize the unused GPIO pins as analog in, with no pull. GPIO_InitTypeDef GPIO_InitStruct; //PA_0, PA_5, PA_6, PA_13, PA_14 to analog nopull GPIO_InitStruct.Pin = GPIO_PIN_0 | GPIO_PIN_5 | GPIO_PIN_6 |GPIO_PIN_13 | GPIO_PIN_14 ; GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); // PB_3 & PB_4 to analog nopull GPIO_InitStruct.Pin = GPIO_PIN_3 | GPIO_PIN_4; GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); // PC_1 to analog nopull GPIO_InitStruct.Pin = GPIO_PIN_1; GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
Thanks,
AjayFebruary 20, 2020 at 7:37 am #30307Jason ReissKeymasterThe examples are for mDot and xDot. On xDot they will be true.
On mDot the current hardware does not support a deepsleep mode as per the message in the debug console. Therefore only sleep mode will be used with RAM maintained, execution resumes after sleep instead of a device reset.
For low power applications xDot is recommended.
-
AuthorPosts
- You must be logged in to reply to this topic.