MDot Deep Sleep RAM status?

Home Forums mDot/xDot MDot Deep Sleep RAM status?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #30286
    Ajay K
    Participant

    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.

    #30292
    Jason Reiss
    Keymaster

    Please see the “Deepsleep functionality change” section.
    https://os.mbed.com/platforms/MTS-mDot-F411/

    #30300
    Ajay K
    Participant

    Thanks 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,
    Ajay

    #30307
    Jason Reiss
    Keymaster

    The 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.

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