-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLE power consumption using CORDIO stack too high #10669
Comments
If debugging with an .svd loaded, are you able to confirm which peripherals are enabled and running between the two examples? Also would be interesting to see the clock configurations between the two. |
Mistyped .svd above. |
@40Grit We are seeing similar power consumption and at times even higher than 1ma during advertisements. One of the other issues, had listed out disabling the cryptocell and here is what the mbed_app.json looks like. Ours is a custom board with NRF52840 BLE module. We are using Cordio API without the Nordic Softdevice.
|
My questions above are wondering what soft device does with the clocks/peripherals/radio settings in order have significantly lower power consumption than cordio stack. |
cc @ARMmbed/mbed-os-pan |
@sagrebin , @yogeshk19 To provide further clarity to my vague posts above. Are either of you able to dump the peripheral registers when using softdevice and when using cordio? The diff between the two dumps could provide some insight since the softdevice sources are closed. |
@40Grit Sorry I haven't had a chance to dump the peripheral registers. I am planning on re-running my power draw tests again after the next mbed-os release which is supposed to have updates to hci driver i believe. I am not planning on using the softdevice at this point, only the Cordio API as is. |
@40Grit I was hoping that with the arrival of nordics sdk 15 it would be fixed by unfortunately its not. I've dumped the registers: |
From the diff it looks like the LFCLK is synthesized from the HFCLK when Cordio is used. That might be one of the cause of the high power consumption. |
Indeed, for some reason the NRF_LF_CLK_SRC is set to CLOCK_LFCLKSRC_SRC_Synth in NRFCordioHCIDriver.cpp |
@sagrebin : so you see |
I have seen the same issue. I am not sure if it is the crystal configuration, I tried changing back the crystal to XTAL, in the initComplete of the BLE stack. But this does not seem to help. |
Same issue here too. watching... |
The best way to get a picture of what is going on is to dump the peripheral and cpu registers between the two examples you are comparing power for. Then do a diff of the dumps. It needs to be considered as well that if a gpio is left in an output state it may result in leaks to other unpowered components on a board. Additionally the pull resistors internal to the gpios for this part are pretty strong. Deffinitely confirm the state of your gpios. |
I've checked the consumption before the ble.init and its 3ua, so roughly what it should be. I can also see that the device just doesn't deep sleep after ble init, see logs below, 0 time in deepsleep :( ... Results from logger |
What is the code for dumping the registers? Thanks |
Should be able to do it through gdb command line or pyocd. J-link commander maybe if using j-link |
you will need to load the .svd file for your target mcu |
Is this being looked at internally by the ARM team? If so i'll just keep on using SoftDevice until resolved |
Latest news is that the BLE PAN team is busy. Embedded Planet, my employer, will probably be looking into this over the next couple months but no promises. Not sure how Cordio governance is going to go moving forward. PacketCraft is probably the new maintainer. |
Also softdevice has its own RTOS internally. I have heard and experienced that it doesnt play very nice with external RTOS's. |
and there's no history at their github repo https://github.com/packetcraft-inc/cordio. How can anybody really keep track of what they are up to? |
I noticed that there is a deep sleep lock in the Cordio idle_hook. (I am using nRF52)
|
@pentabarf You are right It actually says in the documentation: Resources used: That is just complete BS, this really removes LE from BLE. |
@40Grit, @pan- I was wondering based on @pentabarf and @kleunen comments, is there any progress on helping improve the power consumption? Currently our application we have built which advertises 90% of the time and 10% time stays connected, the avg. power consumption is 200 uA when advertising and 300 uA when connected using the Cordio API. When using the softdevice the power draw is around 20 uA when advertising and 9-12 uA when connected. This clearly indicates the Cordio platform is consuming more power than when just using Nordic's softdevice to build a similar application. As mentioned by you earlier that Cordio is no longer the priority for ARM and a different company has taken over the development effort, but I am wondering when companies like mine migrated to Cordio platform assuming that this was the better platform to be on since ARM supported this new platform for BLE and that something so important as BLE Power consumption needs to be handled, what is the escalation mechanism to get either ARM or the new company to address this issue? This issue has been lingering from 9 months now, with no clear priority or resolution in sight. Sorry just venting out! Thanks, |
Thanks @yogeshk19 for the feedback. I'll share this with relevant people. |
@andypowers any updates on this issue and is there a fix anticipated for this issue and will it be back ported to mbed 5? I believe this question was asked April 10th of this year and no response! At the least I would hope the MBED BLE and Packet Craft team to provide a realistic expectation to the consumers of their product. As of today it is more than 2 years and I have never seen a professional organization deal with an issue in this fashion as to not even respond and provide some kind of feedback as to what the MBED team is doing to resolve this issue. This is a serious issue that prevents us from leveraging the BLE feature effectively. I am hoping someone serious enough in the MBED team can either say we will fix this issue or close this issue for good, because its been 2 years since this issue was opened, with no resolution in sight. Thanks, |
so .. you're paying for support from arm and not getting the help you need @yogeshk19 ? |
@yogeshk19 We received a preview of the packetcraft patch that improve the power consumption. It will be integrated when the Cordio stack has been updated to the latest version (#14798). I don't know if it will be back-ported to Mbed OS 5.15 or not. That could be a complex operation as it depends on platform and stack support which have evolved in Mbed OS 6. However it shouldn't be too complex to back-port the Bluetooth API from Mbed OS 6 into Mbed OS 5. |
@pan- Thanks for taking the time to update regarding any progress in this issue. The last time I had asked what is the escalation mechanism and you looped in @andypowers to see if there can be some larger visibility within the ARM MBED BLE team to address this issue sitting for over 2 years. But as you can see from the issue thread, @andypowers hasn't even acknowledged with any response. My point is can we get a release timeframe or commitment from ARM MBED BLE team as to when this would be fixed and made available to be consumed even if it is only going to be fixed in MBED 6? This would help us in planning on migrating our existing products that we have built using the CORDIO BLE Stack from MBED 5 to MBED 6 in a more deterministic fashion. Thanks, |
I think the patch will land in ~4 weeks from now in mbed os 6. |
4 weeks are over. are there any news to this? |
We have updated the cordio stack to the new version (in the feature branch https://github.com/ARMmbed/mbed-os/tree/feature-ble-cordio-21.04) but we are still waiting for the patch that goes with it. |
I did a fast test. just compared my application with mbed-os-6.13.0 and feature-ble-cordio-21.04: |
@paul-szczepanek-arm, @pan, any updates on the patch? |
So 5.11 is still the latest version we can use on NRF52832?
So nutty, this is one of the most popular mcu's in the world of IoT.
…On Mon, 13 Sep 2021, 14:59 andy-kogsys, ***@***.***> wrote:
@paul-szczepanek-arm <https://github.com/paul-szczepanek-arm>, @pan
<https://github.com/pan>, any updates on the patch?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10669 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAW4SX7AVCNADL65DBAHCA3UBX7UVANCNFSM4HPTFNRQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
We have also been waiting keenly for this for a long time now and it is seriously impacting our product development. When will this issue be resolved? |
We closed this issue because it has been inactive for quite some time and we believe it to be low priority. If you think that the priority should be higher, then please reopen with your justification for increasing the priority. |
I believe this is a high priority, given that without it mbed is unable to achieve low power BLE performance on NRF52 hardware. To help with your justification:
I'd suggest that this makes it a high priority and I believe others would agree @stevensam2013 , @bsturgess , @pentabarf , @yogeshk19, @Heinera79 , @apcurtiss . Speaking for myself I would like to use mbed for some new projects, but we are being forced towards Zephyr specifically due to this issue. |
Wow. This is definitly not low priority, it should be one of the highest BLE priorities. |
It is a high priority, and the team are validating a fix from Packetcraft at the moment. The issue was closed by mistake. I've reopened it. |
This is definitely a high priority issue, and it has been ongoing for a long time now. This issue is for the nRF52 which is an extremely popular chip and many of us expect this to work correctly with mBed. This bug makes it unfeasible to use the nRF52 in a product and needs to be rectified. Please re-open this as high priority. Additionally, please provide an update on the patch that was expected to resolve this issue for mbed os 6 late July. |
Is there any roadmap for this issue to be resolved? We're developing an IoT solution with NRF52 and this issue is the main blocker for our power optimization milestone. I tried to use the latest commit from https://github.com/ARMmbed/mbed-os/tree/feature-nrf52-low-power-ble branch. It fixes the high power consumption issue, but the MCU gets stuck in the idle thread after ~9 minutes of work. I can provide additional info if needed. |
@andypowers @pan- @0xc0170 I was wondering if there was any progress made on this issue. Its been almost 3 years since this bug was opened and according to @andypowers "It is a high priority, and the team are validating a fix from Packetcraft at the moment." was mentioned last October. I still don't see progress called out in regards to this issue? Can one of you take the time to comment on the progress on this issue? Also it seems like it would be valuable if the MBED team won't fix this issue, they should clearly call it out and close this issue. At the least this would be some progress regarding this issue instead of staying in this limbo state for almost 3 years. Thanks, |
Description of defect
I've cloned the mbed-os-example-ble repo and removed the LED blinking code and the print statements. When I run the application on my dev board and use nordics power profiler I get an average of 1mA when advertising (advertising interval: 2 sec).
I did the same with the with the deprecated sample BLE_BatteryLevel which uses nordics soft device and I get around 20uA when advertising.
I use a custom dev board with the ublox NINA-B112 module, there are no other components on the board which could consume power.
Target(s) affected by this defect ?
NRF52_DK
Toolchain(s) (name and version) displaying this defect ?
GCC_ARM
What version of Mbed-os are you using (tag or sha) ?
a4738fa
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
mbed-cli 1.10.0
How is this defect reproduced ?
See the description above
The text was updated successfully, but these errors were encountered: