-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Description
Description
Hi =)
[X ] Bug
I'm trying to implement sleep/deep sleep profiling into my project on Nordic's NRF52_DK but with no success. I'm using official mbed-os version mbed-os-5.9.6 and mbed CLI with GCC_ARM compiler.
I've followed instructions from mbed web and added MBED_SLEEP_TRACING_ENABLED macro into my mbed_app.json file but with no success.
I'm quite sure my printf and mbed_app.json part work because this example for mbed statistics works great and the principle is the same (one macro and print on standard IO).
I have found the same problem description on mbed forum here.
I wunder if there's some kind of fix for that or should I have for new version of mbed-os?
Here's the main file (the one from official example on mbed-os):
#include "mbed.h"
int main()
{
while(1)
{
// Deep sleep for 1 second
printf("Deep sleep allowed: %i\r\n", sleep_manager_can_deep_sleep());
wait(1.0);
// Lock deep sleep
printf("Locking deep sleep\r\n");
sleep_manager_lock_deep_sleep();
// Sleep for 1 second
printf("Deep sleep allowed: %i\r\n", sleep_manager_can_deep_sleep());
wait(1.0);
}
}