<?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>Low power BLE advertising with Zephyr on nrf52840, is it supported?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61383/low-power-ble-advertising-with-zephyr-on-nrf52840-is-it-supported</link><description>I&amp;#39;m using the NRF52840-DK with the SB40 jumper cut, then powering through P21 and measuring with an ammeter across P22. USB is unplugged during measurement. I&amp;#39;m using zephyr with ncs v1.2.0. 
 
 I have built the samples/boards/nrf/system_off example and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 May 2020 07:37:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61383/low-power-ble-advertising-with-zephyr-on-nrf52840-is-it-supported" /><item><title>RE: Low power BLE advertising with Zephyr on nrf52840, is it supported?</title><link>https://devzone.nordicsemi.com/thread/249842?ContentTypeID=1</link><pubDate>Thu, 14 May 2020 07:37:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:788bd953-334b-49a1-a7e1-56e1095942ca</guid><dc:creator>jeremyherbert</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for your quick reply.&amp;nbsp;I just tried `nrfjprog --reset` and it now works fine; I&amp;#39;m measuring about 6mA during TX and otherwise a few uA during sleep. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I was using openocd to flash; it seems that when using openocd to flash the device, it is not reset correctly and perhaps the debugger stays enabled? I&amp;#39;m using the version that goes with Zephyr:&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/openocd"&gt;https://github.com/zephyrproject-rtos/openocd&lt;/a&gt;&amp;nbsp;and I&amp;#39;m using it over nrfjprog because the IDE I am using (CLion) supports debugging/flashing with openocd.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The invocation is this:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;/home/jeremy/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/openocd -c &amp;quot;tcl_port disabled&amp;quot; -s /home/jeremy/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts -c &amp;quot;gdb_port 3333&amp;quot; -c &amp;quot;telnet_port 4444&amp;quot; -f /home/jeremy/Desktop/low_power_test/nordic_nrf52_dk.cfg -c &amp;quot;program \&amp;quot;/home/jeremy/Desktop/low_power_test/cmake-build-debug/zephyr/zephyr.elf\&amp;quot;&amp;quot; -c reset -c shutdown&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;Open On-Chip Debugger 0.10.0+dev-01340-ga0e8edc4e-dirty (2020-02-14-05:38)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : Zephyr: looking for target: cortex_m
Info : Zephyr: target known, params at 0x907220
Info : J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 21 2020 17:30:48
Info : Hardware version: 1.00
Info : VTarget = 3.300 V
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000140c msp: 0x20002408
** Programming Started **
Info : nRF52840-xxAA(build code: C0) 1024kB Flash, 256kB RAM
Warn : Flash protection of this nRF device is not supported
Info : Padding image section 0 at 0x0000cef0 with 5 bytes
Info : Padding image section 1 at 0x0000d3fd with 3 bytes (bank write end alignment)
Warn : Adding extra erase range, 0x0000d400 .. 0x0000dfff
** Programming Finished **
shutdown command invoked&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Low power BLE advertising with Zephyr on nrf52840, is it supported?</title><link>https://devzone.nordicsemi.com/thread/249833?ContentTypeID=1</link><pubDate>Thu, 14 May 2020 06:58:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79f1f083-a945-4b91-8f97-349a9b814ad5</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for providing sample code and configuration, compiled out-of-the-box.&lt;/p&gt;
&lt;p&gt;I cannot see that you are missing any settings. 1.3 mA is high. Are you connecting with the debugger? That normally gives a bit higher current consumption on nRF52840 (around 1.6 mA). If I do not power cycle or reset the device after programming (ninja flash), I see approx. 1.37 mA. Could this be the issue?&lt;/p&gt;
&lt;p&gt;I took the samples/bluetooth/peripheral_dis, pasted your code into main.c, and added these to prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SYS_POWER_MANAGEMENT=y
CONFIG_SYS_POWER_DEEP_SLEEP_STATES=y
CONFIG_SYS_PM_STATE_LOCK=y
CONFIG_SERIAL=n&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After power cycling (or issuing a &amp;quot;nrfjprog --reset&amp;quot;), this behaves as expected when testing with nRF52840-DK (SB40 cut), with the lowest power consumption is approx. 4 uA, and throttles higher once per second, per the advertising interval you set.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>