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.
7 years ago.
nrf52 mbed-os huge power consumption
Hi, I'm developing a project for Nordic's nrf52 uProcessor and I have some problems with power consumption. Here's what the problem is: recently I moved to newest version of mbed-os (v5.6.6) from very old version and now I can not put the processor in sleep mode anymore. Here's a very simple code snippet that consumes 900uA of current (the problem is not in HW- tried the code with the older version).
#include "mbed.h" int main(){ while(1){ __WFI(); } }
It's simple as that. On the older version that code would consume only 1.5uA (vs. 900uA on newest version). Do you have any idea what's the problem? I tried to use WFE and even mbed's sleep function. Maybe the problem is that main thread can not be stopped or something like that...? Thank you.
1 Answer
7 years ago.
Do you have the same issues when calling the sleep()
function? Here's the implementation, it seems to do more than just calling WFI
/WFE
.
Reported here, core team will respond: https://github.com/ARMmbed/mbed-os/issues/5713
posted by 15 Dec 2017Jurica, please review the reply in the github issue. You are effectively using mbed OS, therefore sleep function should not be used, rather leave it to an idle task (that one determines that there's nothing to do, and manages what sleep mode can actually be entered), and can manage System Tick for RTOS itself (it ticks by default 1ms therefore wakes up always if only sleep used).
posted by 15 Dec 2017