Skip to content

DISCO-BL475E-IOT01A doesn't exit deep sleep #13751

Closed
@andreagilardoni

Description

@andreagilardoni

Description of defect

DISCO-BL475E-IOT01A device is unable to exit from deep sleep.

I wrote a simple code to check power modes of devices and their power consumption. Everything works fine except when the device enters deep sleep.

Here is the sample code:

DigitalOut led(LED1);

int main() {
    //sleep_manager_lock_deep_sleep();
    printf("turning on\n");
    printf("System clock is %ld\n", SystemCoreClock);
    
    while (1) {
        printf("\n\ninit\n");
        // blink the LED
        sleep_manager_lock_deep_sleep();
        led=1;
        ThisThread::sleep_for(2s);
        led=0;
        sleep_manager_unlock_deep_sleep();
        
        printf("\n\nrun\n");
        time_t start=time(NULL);
        uint64_t i=0;
        while((time(NULL)-start)<2) {
            i++;
        }
        printf("counter: %llu\n", i);
        printf("\n\nsleep\n");

        sleep_manager_lock_deep_sleep();
        ThisThread::sleep_for(2s);
        sleep_manager_unlock_deep_sleep();
        
        printf("\n\ndeep sleep\n");
        ThisThread::sleep_for(2s);
    }
    return 0;
}

the mbed_app.json I am using is:

{
    "target_overrides": {
        "*": {
            "platform.stdio-baud-rate": 115200,
            "platform.default-serial-baud-rate": 115200,
        },
        "DISCO_L475VG_IOT01A": {
            "target.clock_source": "USE_PLL_HSI"
        }
    }
}

Target(s) affected by this defect ?

DISCO-BL475E-IOT01A

Toolchain(s) (name and version) displaying this defect ?

GCC_ARM

What version of Mbed-os are you using (tag or sha) ?

ad40b1b

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

mbed-cli 1.10.4
arm-none-eabi-g++ (GNU Arm Embedded Toolchain 9-2020-q2-update) 9.3.1 20200408 (release)

How is this defect reproduced ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions