<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Reducing power consumption during wake-up</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120592/reducing-power-consumption-during-wake-up</link><description>Hello, I am working with a Seeed XIAO nRF52840. 
 I&amp;#39;m able to get an average of 500 uA in SYSTEM OFF mode. However, for this application, the current consumption during wake-up is quite high (6mA plateau and then an 8 mA peak). 
 I would like to know</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 11 Apr 2025 14:04:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120592/reducing-power-consumption-during-wake-up" /><item><title>RE: Reducing power consumption during wake-up</title><link>https://devzone.nordicsemi.com/thread/531551?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 14:04:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d7d94a5-d750-4792-923f-a4795c561ba5</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Looks like that Arduino stuff uses some kind of bootloader. And since SYSTEM OFF will always end in a full reset, it gets triggered every time the device wakes up, validates the firmware and waits for a pin to toggle, then starts the application code.&lt;/p&gt;
&lt;p&gt;You can see that the app runs with DCDC enabled causing less current consumtion.&lt;/p&gt;
&lt;p&gt;Its probably easier to switch to the NRF connect SDK than to try to fix the current consumtion with the Arduino libs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing power consumption during wake-up</title><link>https://devzone.nordicsemi.com/thread/531550?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 13:55:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a211e81b-ef7e-480e-ae27-c7ede2ce3e22</guid><dc:creator>Juan Lopez</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/120592/reducing-power-consumption-during-wake-up/531536"]Well, it is probably working as intended, but the application is not doing anything. It just powers itself off (system off mode) immediately after starting. So the last while(1); and return 0; are never reached[/quote]
&lt;p&gt;Okay, I will look into the SDK examples that use SYSTEM OFF and check if they work as intended. I&amp;#39;ll report back with the results.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/120592/reducing-power-consumption-during-wake-up/531536"]I suggest you check out some of the sample applications. I like the NCS\nrf\samples\bluetooth\peripheral_uart. Try building that, and see if you can see any advertisements using the nRF Connect for Android/iOS app.&amp;nbsp;[/quote]
&lt;p&gt;I ran &amp;quot;multiple_adv_sets&amp;quot; not long after trying that SYSTEM OFF code I sent in the last reply, and received the data in both Android and iOS, so the BLE Stack is working alright.&lt;/p&gt;
&lt;p&gt;Thank you for your help, have a good weekend.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing power consumption during wake-up</title><link>https://devzone.nordicsemi.com/thread/531536?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 13:08:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4dbaec32-e4ac-45db-b276-1f2ae0628b8b</guid><dc:creator>Edvin</dc:creator><description>[quote user="Juan Lopez"]Right now, I&amp;#39;m waking up from SYSTEM OFF by pulling a pin LOW.[/quote]
&lt;p&gt;Yes, that would be the same as a button press. A button press is just a GPIO change interrupt, so this is your &amp;quot;external event&amp;quot;.&amp;nbsp;&lt;/p&gt;
[quote user="Juan Lopez"]If I understood your post correctly, the system should wake up from SYSTEM OFF to SYSTEM ON Sleep?[/quote]
&lt;p&gt;Well, preferably you would want your application to do something before going to sleep. The application will &amp;quot;automatically&amp;quot; go to sleep (system on) whenever it can. And if your application detects that it hasn&amp;#39;t been connected to for the last 1 minute, 10 minutes or one hour (that is up to you), then you can enter system off. Or just advertise forever, until someone connects to it again.&lt;/p&gt;
[quote user="Juan Lopez"]Am I doing something wrong/missing something in my code?[/quote]
&lt;p&gt;Well, it is probably working as intended, but the application is not doing anything. It just powers itself off (system off mode) immediately after starting. So the last while(1); and return 0; are never reached.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I suggest you check out some of the sample applications. I like the NCS\nrf\samples\bluetooth\peripheral_uart. Try building that, and see if you can see any advertisements using the nRF Connect for Android/iOS app.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing power consumption during wake-up</title><link>https://devzone.nordicsemi.com/thread/531489?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 09:22:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02bec6c8-7089-453b-892f-d40beb4de482</guid><dc:creator>Juan Lopez</dc:creator><description>&lt;p&gt;Hello, no problem haha&lt;/p&gt;
&lt;p&gt;Right now, I&amp;#39;m waking up from SYSTEM OFF by pulling a pin LOW.&lt;/p&gt;
&lt;p&gt;If I understood your post correctly, the system should wake up from SYSTEM OFF to SYSTEM ON Sleep?&lt;/p&gt;
&lt;p&gt;I just installed the nrf SDK for VSCode and flashed this code into the board:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/drivers/gpio.h&amp;gt;
#include &amp;lt;nrfx_power.h&amp;gt;


int main(void) {
    NRF_POWER-&amp;gt;DCDCEN0 = 1;
    NRF_POWER-&amp;gt;DCDCEN = 1;

    // Configure the wakeup pin
    //configure_wakeup_pin();
	NRF_POWER-&amp;gt;SYSTEMOFF = 1;
	while(1);

    return 0;
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But I see this power consumption in the profiler:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1744363283314v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Am I doing something wrong/missing something in my code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing power consumption during wake-up</title><link>https://devzone.nordicsemi.com/thread/531444?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 21:22:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a67a0cea-a684-4a28-a08b-e453248457e1</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry, I should have specified. There are two types of sleep. System on and system off. sd_power_system_off() and NRF_POWER-&amp;gt;SYSTEMOFF=1; is basically the same thing, and it puts the chip in system off, which is the deepest level of sleep. This mode, however, does require an external source for wakeup. That could be a button press (GPIO interrupt) or a power on reset (turning the device off and on).&lt;/p&gt;
&lt;p&gt;Then we have the system on sleep, which is a &amp;quot;lighter sleep&amp;quot;. We use this between e.g. advertisement packets, or radio events when you are in a connection, or whenever you run out of things to do.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is what the current consumption looks like when you are using the system on sleep when advertising:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1744319060182v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;You can see that the 3 spikes that occurs 3 times in this screenshot are 3 advertising events, advertising on 3 channels every advertising interval. Also you can see the average current consumption in this case is 615.39µA (measured from the start of one advertising event to the start of the next).&lt;/p&gt;
&lt;p&gt;The CPU is barely being used apart from the advertising events, so the base current is almost nothing (there are some spikes charging up some capacitors, which is creating some smaller spikes on ~3mA, and there is some added base current because there is a timer going that&amp;nbsp; keeps track of the timing between the advertising events). The spikes in your screenshot is the same, but you can see that it is much lower. only around 10µA, This is only the capacitors being charged, in order to make sure it can wake up on an external event.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But from the current measurements in your first post, it looks like there is about 0.5 secons with a constant current consumption of 6mA. This makes me think that it doesn&amp;#39;t go to system on mode sleep. So while the Arduino IDE is nice and easy to get started, it is not intended for professional use, and has some obvious disadvantages.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="Juan Lopez"]Can I use the SDK and softdevice with the Seeed Studio XIAO nrf52840 or do I need the Development Kit for this?[/quote]
&lt;p&gt;You can use it. According to this site:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/boards/seeed/xiao_ble/doc/index.html"&gt;https://docs.zephyrproject.org/latest/boards/seeed/xiao_ble/doc/index.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You need to select your target board &amp;quot;xiao_ble/nrf52840&amp;quot;:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1744319592472v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Just tested one sample now, and it built &amp;quot;without&amp;quot; any warnings. (it had some warnings that you need to configure some USB device (P)ID before production.&lt;/p&gt;
&lt;p&gt;I do not, however, know anything about the experience using this board. The fact that it mentions USB when I built the peripheral_uart sample tells me that it probably doesn&amp;#39;t have a debugger, and uses the USB as a transport to a bootloader, and it uses USB for serial communication. In a perfect world, this works fine, but as soon as the app crashes, it means that the USB also crashes, and the logging will stop. So it may cause some challenges, and you can&amp;#39;t properly debug, but you can give it a go.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you are in serious business, however, I can really recommend that you get hold of a Development Kit. The debugger makes debugging and logging a lot more reliable. And if you are using the seeed device for it&amp;#39;s form factor, then you can port the application to run on this after you are done with the application development.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please note the programming and debugging section:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/boards/seeed/xiao_ble/doc/index.html#programming-and-debugging"&gt;https://docs.zephyrproject.org/latest/boards/seeed/xiao_ble/doc/index.html#programming-and-debugging&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So it looks like you should be able to flash directly from nRF Connect SDK (in VS Code) because it is familiar with the bootloader. If you buy a Nordic Development kit, it comes with an on-board debugger, which you can also use to flash and debug external devices. So depending on how much you struggle with the seeed device directly, you may consider this.&lt;/p&gt;
&lt;p&gt;Let me know if you encounter any issues during startup with NCS (nRF Connect SDK). I can really recommend the &amp;quot;nRF Connect SDK Fundamentals&amp;quot; course that we have on DevAcademy:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The SDK is a mouthful, so perhaps you can avoid some pitfalls by following this course to get familiar with the SDK and it&amp;#39;s environment.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing power consumption during wake-up</title><link>https://devzone.nordicsemi.com/thread/531392?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 14:10:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1eb53fbd-727a-4714-b950-ec7afd22b223</guid><dc:creator>Juan Lopez</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;When I put it to sleep, I see this in the power profiler application both when entering system off using the register and using &lt;pre class="ui-code" data-mode="text"&gt;  sd_power_system_off();
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1744294200166v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can I use the SDK and softdevice with the Seeed Studio XIAO nrf52840 or do I need the Development Kit for this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing power consumption during wake-up</title><link>https://devzone.nordicsemi.com/thread/531386?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 13:57:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce7a84be-c01b-42eb-9021-957d3a3bbc1a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It looks like it doesn&amp;#39;t go to sleep properly. I am not familiar with the Arduino implementation for the nRF52840. But I believe that if you want it to be properly low power, you should use the &lt;a href="https://www.nordicsemi.com/Products/Development-software/nRF-Connect-SDK/GetStarted"&gt;nRF Connect SDK&lt;/a&gt;. It is a bit more complex than Arduino, but in that case you will use our SoftDevice Controller (Bluetooth Low Energy stack), and you will see a better current consumption.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>