Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years, 9 months ago.
Ticker.h ln 125 locking deep sleep at start of blank program
Hi there,
I'm using an STM32L073RZ and attempting to go into deep sleep. To enable development I've defined the "MBED_SLEEP_TRACING_ENABLED" macro to provide debug messages over UART. I'm running MbedOS 5.11.2.
At the very beginning of my program I assume that OS creates a Ticker object and calls attach_us() as the following is printed over UART:
LOCK:Ticker.h ln: 125, lock count: 1.
This will obviously block deep sleep. Immediately after this the detach() function is called but instead of displaying an UNLOCK message, the following is displayed:
Unlocking sleep for driver that was not previously locked: Ticker.cpp, ln: 32.
From this point my application is completely blocked from deep sleep. For completeness, here's my code:
int main() { while(true) { } }