ARMmbed / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things
https://mbed.com
Other
4.68k stars 2.99k forks source link

Deepsleep and sleep does not work in STM32L0 series #4191

Closed rbonghi closed 7 years ago

rbonghi commented 7 years ago

Description


Bug

Target STM32L0 series

Toolchain: ARM

Toolchain version: 5.x

Expected behavior Go to sleep or deepsleep

Actual behavior Skip the functions sleep() and deepsleep()

Steps to reproduce

int main()
{ 
    while (1) {
            printf("Entering sleep\n");
            sleep();
            printf("Entering deepsleep\n");
            deepsleep();
        }
    }
}

Enhancement

Suggested enhancement From release 137 https://developer.mbed.org/users/mbed_official/code/mbed/rev/e1686b8d5b90 the functions deepsleep() and sleep() does not work. If w go to release 136 the deepsleep and sleep functions works. I Think the error is from 137 release.

joaogmauricio commented 7 years ago

Hi Raffaello,

I shall add that the issue also affects Nucleo L476LG boards.

Best regards, João

bulislaw commented 7 years ago

Sleep was disabled in develop (default) build profile https://docs.mbed.com/docs/mbed-os-handbook/en/latest/dev_tools/build_profiles/ it's going to change soon https://github.com/ARMmbed/mbed-os/pull/4097

bulislaw commented 7 years ago

sleep()/deepsleep() should work for develop and release profiles on master, for platforms it's defined for. I'll close this issue, please reopen it if you have any further questions.