<?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>SoftDevice in Low Power device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46905/softdevice-in-low-power-device</link><description>Hello, 
 I use the LAIRD module BL652 with an nRF52832 with the SoftDevice 14.0.0 (old version…). 
 The application use the BLE with the SoftDevice. 
 We have mesured the device consumption and we arrive to the value of 0.6 mA. 
 The application do each</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 May 2019 05:40:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46905/softdevice-in-low-power-device" /><item><title>RE: SoftDevice in Low Power device</title><link>https://devzone.nordicsemi.com/thread/186822?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 05:40:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:099d263a-7dd7-4844-b821-166dad4c96e3</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am glad to hear you got the current consumption down.&lt;/p&gt;
[quote user="d.altmann"]a) I have put the pin 27 in input with &amp;quot;nrf_gpio_cfg_input(27, NRF_GPIO_PIN_NOPULL);&amp;quot; and this function make a high current so I disable it (I not use this pin now…)[/quote]
&lt;p&gt;There should not be anything special with pin 27 (other than that it is close t the radio). However, if you use a input pin without a pull resistor you must make sure that the external circuitry prevents the pin from floating. If the external circuitry does not always cause a pin voltage within the logic 0 or logic 1 levels, you should use a pull resistor to prevent the pin from floating. A floating pin can result in undefined behavior and high current consumption.&lt;/p&gt;
[quote user="d.altmann"]b) When I configure the ADC, I use an example with PPI and Timer with &amp;quot;nrf_drv_timer_init&amp;quot; and this timer consume a lot. So I disable this timer and use another timer which works fine.[/quote]
&lt;p&gt;&amp;nbsp;It is difficult to say what this other timer is, but if it is an RTC that makes sense.&amp;nbsp;In that case, that is the same as what you get if you use the SAADC driver in low power mode (set low_power_mode in the nrfx_saadc_config_t instance passed to nrfx_saadc_init()).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice in Low Power device</title><link>https://devzone.nordicsemi.com/thread/186506?ContentTypeID=1</link><pubDate>Sat, 11 May 2019 15:42:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f0246d7-84d6-43af-9f7e-735a5be167b4</guid><dc:creator>d.altmann</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for your helps.&lt;/p&gt;
&lt;p&gt;I have now a very low power product (after many test).&lt;/p&gt;
&lt;p&gt;I fact, I have many part with &amp;quot;high&amp;quot; current.&lt;/p&gt;
&lt;p&gt;a) I have put the pin 27 in input with &amp;quot;nrf_gpio_cfg_input(27, NRF_GPIO_PIN_NOPULL);&amp;quot; and this function make a high current so I disable it (I not use this pin now&amp;hellip;)&lt;/p&gt;
&lt;p&gt;b) When I configure the ADC, I use an example with PPI and Timer with &amp;quot;nrf_drv_timer_init&amp;quot; and this timer consume a lot. So I disable this timer and use another timer which works fine.&lt;/p&gt;
&lt;p&gt;At final, the product have a 100/200 &amp;micro;A of current so it&amp;#39;s very nice for us.&lt;/p&gt;
&lt;p&gt;Thank you for your helps.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Damien ALTMANN&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice in Low Power device</title><link>https://devzone.nordicsemi.com/thread/185348?ContentTypeID=1</link><pubDate>Mon, 06 May 2019 06:56:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63c53da0-438e-4acf-850a-1255d4ab23ce</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="d.altmann"]a) Perhaps that exist a some running peripheral because we use the ADC, the PWM, the GPIO....but during a low power mode, this peripheral not switch off ??[/quote]
&lt;p&gt;The peripherals are not automatically turned off when you enter system off low power mode. That only makes the CPU sleep, but you are responsible for disabling any other peripherals. If any peripheral that need the HF clock is active, then you should expect a current consumption in the order of 0.5 mA.&lt;/p&gt;
[quote user="d.altmann"]b) Yes, in end of main loop, I call the &amp;quot;sd_power_mode_set&amp;quot; function + &amp;quot;nrf_pwr_mgmt_run&amp;quot; to enter in low power mode.[/quote]
&lt;p&gt;That&amp;#39;s good. All you need i to call nrf_pwr_mgmt_run() in the end of your main loop. You can skip the call to&amp;nbsp;sd_power_mode_set() though, as it does not have any use here (as described in my previous reply).&lt;/p&gt;
[quote user="d.altmann"]c) Into the sdk_config.h, I put the value 16 into the &amp;quot;NRF_SDH_CLOCK_LF_RC_CTIV&amp;quot;. So, I hope that the softDevice do the good crystal calibration.[/quote]
&lt;p&gt;There is no calibration when you have set&amp;nbsp;NRF_SDH_CLOCK_LF_SRC to 1, as that specifies that you will use the 32.768 kHz crystal as reference (which does not need calibration). Calibration is automatically handled by the SoftDevice when you select RC oscillator by setting&amp;nbsp;NRF_SDH_CLOCK_LF_SRC to 0.&lt;/p&gt;
[quote user="d.altmann"]Is it better to use the RC internal oscillator for the SoftDevice ?? and the peripheral ??[/quote]
&lt;p&gt;If you have a crystal on board, you should use that as it leads to a reduced average current consumption, particularly when you are in a BLE connection. This is not related to the&amp;nbsp;0.6 mA current consumption you see though, as the LFCLK has a far lower current consumption regardless of using RC or xtal.&lt;/p&gt;
[quote user="d.altmann"]d) For exemple, to cut off the PWM peripheral when I not use, I call the function &amp;quot;pwm_uinit();&amp;quot;.[/quote]
&lt;p&gt;Yes, that is correct. You should call the _uninit() function for any peripherals you do not need running during sleep, and definitely any peripheral that use the HF clock (which is most of them).&lt;/p&gt;
&lt;p&gt;If you still have problems after making sure you disable peripherals before going to sleep, I suggest you comment out parts of your code so that you don&amp;#39;t use any peripherals and measure current. Then add things back until you get the high sleep current. Once you know what causes the high sleep current you can move on to fixing it, which is then usually not a big problem. (Sometimes you need to dos something similar to the workarounds for &lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev2/ERR/nRF52832/Rev2/latest/anomaly_832_89.html?cp=3_1_1_0_1_26"&gt;erratum 89&lt;/a&gt;, which can also affect other peripherals than what is currently documented).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice in Low Power device</title><link>https://devzone.nordicsemi.com/thread/185302?ContentTypeID=1</link><pubDate>Sun, 05 May 2019 08:40:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f0fa99b-6caa-4c54-b49c-86953242f58a</guid><dc:creator>d.altmann</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for the response.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;a) Perhaps that exist a some running peripheral because we use the ADC, the PWM, the GPIO....but during a low power mode, this peripheral not switch off ??&lt;/p&gt;
&lt;p&gt;b) Yes, in end of main loop, I call the &amp;quot;sd_power_mode_set&amp;quot; function + &amp;quot;nrf_pwr_mgmt_run&amp;quot; to enter in low power mode.&lt;/p&gt;
&lt;p&gt;c) Into the sdk_config.h, I put the value 16 into the &amp;quot;NRF_SDH_CLOCK_LF_RC_CTIV&amp;quot;. So, I hope that the softDevice do the good crystal calibration.&lt;/p&gt;
&lt;p&gt;I have the &amp;quot;#define NRF_SDH_CLOCK_LF_SRC 1&amp;quot; to execute the external Crystal.&lt;/p&gt;
&lt;p&gt;I have the &amp;quot;#define CLOCK_CONFIG_LF_SRC 1&amp;quot; too.&lt;/p&gt;
&lt;p&gt;Is it better to use the RC internal oscillator for the SoftDevice ?? and the peripheral ??&lt;/p&gt;
&lt;p&gt;d) For exemple, to cut off the PWM peripheral when I not use, I call the function &amp;quot;pwm_uinit();&amp;quot;.&lt;/p&gt;
&lt;p&gt;Is it a good function ?? or I shall be cut the PWM clock too ??&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Damien ALTMANN&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice in Low Power device</title><link>https://devzone.nordicsemi.com/thread/185212?ContentTypeID=1</link><pubDate>Fri, 03 May 2019 13:45:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7db27a80-494e-45fb-9e21-e3f99dfc0d18</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]We have mesured the device consumption and we arrive to the value of 0.6 mA.[/quote]
&lt;p&gt;A current consumption in this order indicate that the HF clock is running. This is typically because a peripheral that use the HF clock has not been disabled, or you are seeing&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev2/ERR/nRF52832/Rev2/latest/anomaly_832_89.html?cp=3_1_1_0_1_26"&gt;erratum 89&lt;/a&gt;.&lt;/p&gt;
[quote user=""]The application do each second some treatment (very little) and go into the low power mode with the command &amp;quot;sd_power_mode_set(NRF_POWER_MODE_LOWPWR);&amp;quot;. So, it work fine.[/quote]
&lt;p&gt;There is no need to call&amp;nbsp;sd_power_mode_set() to set&amp;nbsp;NRF_POWER_MODE_LOWPWR, as this is the default configuration.&lt;/p&gt;
[quote user=""]Question : Into the configuration file (sdk_config.h), it exist a part or parameters to changes the wake-up time of the softDevice ??[/quote]
&lt;p&gt;&amp;nbsp;The SoftDevice will only wake up on these occasions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Processing needed due to BLE events&lt;/li&gt;
&lt;li&gt;Regular calibration of the LFRC clock (if not using 32 kHz crystal). The calibration interval depends on the configuration of&amp;nbsp;NRF_SDH_CLOCK_LF_RC_CTIV in sdk_config.h.&lt;/li&gt;
&lt;/ul&gt;
[quote user=""]If you can help me to decrease the current consumption of the device, it will be great.[/quote]
&lt;p&gt;You should generally disable all peripherals that use the HF clock, and any other peripherals you don&amp;#39;t need. However, an internal RTC instance has a negligible current consumption of 0.1&amp;nbsp;μA, since the 32 kHz clock is anyway running (as well as RTC0) because it is needed for SoftDevice timing, so there is no need to stop that. Then just call sd_app_evt_wait() in the main loop, either directly, or via&amp;nbsp;nrf_pwr_mgmt_run().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>