<?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>BM833 energy saving</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81874/bm833-energy-saving</link><description>Dear forum, 
 I want to achive low energy consumption for a BM833 (with crystal). 
 From the following thread, I could deduct, that running the softdevice, an average of 300+ uA is required: 
 https://devzone.nordicsemi.com/f/nordic-q-a/10425/possible</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Nov 2021 12:54:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81874/bm833-energy-saving" /><item><title>RE: BM833 energy saving</title><link>https://devzone.nordicsemi.com/thread/340067?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 12:54:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ecda3ee-7b61-4c96-b3cf-19a01a333df5</guid><dc:creator>Vidar Berg</dc:creator><description>[quote userid="103815" url="~/f/nordic-q-a/81874/bm833-energy-saving/340064#340064"]If I do, as you suggest, with all LFRC clock-configuration as suggested, I see an average current of 300+ uA (the same 300+ uA that were observed, before I changed the clock settings in sdk_config.h for LFRC, as you suggested below).[/quote]
&lt;p&gt;Which of the suggested clock configurations did you select, the LFXO or LFRC?&lt;/p&gt;
[quote userid="103815" url="~/f/nordic-q-a/81874/bm833-energy-saving/340064#340064"]So, the question still is, how to get the current down to the famous 2.2uA (or at least significantly below 300+ uA)?[/quote]
&lt;p&gt;It must be caused by something else if you selected one of the clock sources above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BM833 energy saving</title><link>https://devzone.nordicsemi.com/thread/340064?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 12:49:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c419aaed-fde0-4c55-9df5-9c808c6348b7</guid><dc:creator>RichardHdrd</dc:creator><description>&lt;p&gt;Hello Vidar,&lt;/p&gt;
&lt;p&gt;Sorry to continue the thread from here, but the forum doesn&amp;#39;t allow me to respond from your last suggestion (&amp;quot;enable the Softdevice and use the idle_state_handle().&amp;quot;).&lt;/p&gt;
&lt;p&gt;If I do, as you suggest, with all LFRC clock-configuration as suggested, I see an average current of 300+ uA (the same 300+ uA that were observed, before I changed the clock settings in sdk_config.h for LFRC, as you suggested below).&lt;/p&gt;
&lt;p&gt;So, the question still is, how to get the current down to the famous 2.2uA (or at least significantly below 300+ uA)?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BM833 energy saving</title><link>https://devzone.nordicsemi.com/thread/340044?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 12:09:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cc95ffd-f29c-4913-baa3-41960b9d04e3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Richard,&lt;/p&gt;
&lt;p&gt;There is no benefit to enabling and disabling the Softdevice as shown in your code snippet if you are going to keep the LF clock active anyway. I suggest you enable the Softdevice and use the idle_state_handle() as in our other SDK BLE examples.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BM833 energy saving</title><link>https://devzone.nordicsemi.com/thread/340019?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 11:03:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca9ae68e-e184-4cb3-aa08-3e87b0a74ddb</guid><dc:creator>RichardHdrd</dc:creator><description>&lt;p&gt;Hello Vidar,&lt;/p&gt;
&lt;p&gt;Thank you for your advice. I adjusted the sdk_config.h as suggested by you, but I keep measuring the same current average of 300+ uA.&lt;/p&gt;
&lt;p&gt;I then tried to modify:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;//old energy idle
static void idle_state_handle(void)
{
    if (NRF_LOG_PROCESS() == false)
    {
        nrf_pwr_mgmt_run();
    }
}

//new energy idle
static void idle_state_handle(void)
{
    if (NRF_LOG_PROCESS() == false)
    {
        if (nrf_sdh_is_enabled())
        {
            nrf_sdh_suspend();
            nrf_sdh_disable_request();
            //NRF_CLOCK-&amp;gt;TASKS_HFCLKSTOP = 1;
        }
        __WFE();
        if (!nrf_sdh_is_enabled())
        {
            //NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;
            nrf_sdh_enable_request();
            nrf_sdh_evts_poll();
        }
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But this did not only increase the required current, but also rendered all my timers inactive.&lt;/p&gt;
&lt;p&gt;BTW timers, this is the way I implemented them:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;main.c:

APP_TIMER_DEF(m_bsp_tmr1);

int main(void)
{
    (...)
    uint32_t timeout_ticks1 = APP_TIMER_TICKS(2000);
    err_code = app_timer_create(&amp;amp;m_bsp_tmr1, APP_TIMER_MODE_REPEATED, m_timer_handler1);
    APP_ERROR_CHECK(err_code);
    app_timer_start(m_bsp_tmr1, timeout_ticks1, NULL);
    (...)
    for (;;)
    {
        idle_state_handle();
        NRF_LOG_INFO(&amp;quot;Active&amp;quot;);
        NRF_LOG_FLUSH();
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So maybe there is something additional that needs to be set, cleared or considered to get to a low current consumption while keeping timers active?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BM833 energy saving</title><link>https://devzone.nordicsemi.com/thread/339879?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 16:30:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab63a308-d08c-4e89-bf71-069c976c084d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Richard,&lt;/p&gt;
&lt;p&gt;For LFXO you can use the following configuration:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/ &amp;lt;/h&amp;gt; 
//==========================================================

// &amp;lt;h&amp;gt; Clock - SoftDevice clock configuration

//==========================================================
// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_SRC_RC 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_SRC_XTAL 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_SRC_SYNTH 

#ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 1
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
#ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 0
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
// &amp;lt;i&amp;gt; How often (in number of calibration intervals) the RC oscillator shall be calibrated
// &amp;lt;i&amp;gt;  if the temperature has not changed.

#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 0
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_ACCURACY_250_PPM 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_ACCURACY_500_PPM 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_ACCURACY_150_PPM 
// &amp;lt;3=&amp;gt; NRF_CLOCK_LF_ACCURACY_100_PPM 
// &amp;lt;4=&amp;gt; NRF_CLOCK_LF_ACCURACY_75_PPM 
// &amp;lt;5=&amp;gt; NRF_CLOCK_LF_ACCURACY_50_PPM 
// &amp;lt;6=&amp;gt; NRF_CLOCK_LF_ACCURACY_30_PPM 
// &amp;lt;7=&amp;gt; NRF_CLOCK_LF_ACCURACY_20_PPM 
// &amp;lt;8=&amp;gt; NRF_CLOCK_LF_ACCURACY_10_PPM 
// &amp;lt;9=&amp;gt; NRF_CLOCK_LF_ACCURACY_5_PPM 
// &amp;lt;10=&amp;gt; NRF_CLOCK_LF_ACCURACY_2_PPM 
// &amp;lt;11=&amp;gt; NRF_CLOCK_LF_ACCURACY_1_PPM 

#ifndef NRF_SDH_CLOCK_LF_ACCURACY
#define NRF_SDH_CLOCK_LF_ACCURACY 7
#endif
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And for LFRC you can use this one (notice that the accuracy is changed to 500 ppm. This is required when using the LFRC):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;/h&amp;gt; 
//==========================================================

// &amp;lt;h&amp;gt; Clock - SoftDevice clock configuration

//==========================================================
// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_SRC_RC 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_SRC_XTAL 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_SRC_SYNTH 

#ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
#ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 16
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
// &amp;lt;i&amp;gt; How often (in number of calibration intervals) the RC oscillator shall be calibrated
// &amp;lt;i&amp;gt;  if the temperature has not changed.

#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_ACCURACY_250_PPM 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_ACCURACY_500_PPM 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_ACCURACY_150_PPM 
// &amp;lt;3=&amp;gt; NRF_CLOCK_LF_ACCURACY_100_PPM 
// &amp;lt;4=&amp;gt; NRF_CLOCK_LF_ACCURACY_75_PPM 
// &amp;lt;5=&amp;gt; NRF_CLOCK_LF_ACCURACY_50_PPM 
// &amp;lt;6=&amp;gt; NRF_CLOCK_LF_ACCURACY_30_PPM 
// &amp;lt;7=&amp;gt; NRF_CLOCK_LF_ACCURACY_20_PPM 
// &amp;lt;8=&amp;gt; NRF_CLOCK_LF_ACCURACY_10_PPM 
// &amp;lt;9=&amp;gt; NRF_CLOCK_LF_ACCURACY_5_PPM 
// &amp;lt;10=&amp;gt; NRF_CLOCK_LF_ACCURACY_2_PPM 
// &amp;lt;11=&amp;gt; NRF_CLOCK_LF_ACCURACY_1_PPM 

#ifndef NRF_SDH_CLOCK_LF_ACCURACY
#define NRF_SDH_CLOCK_LF_ACCURACY 1
#endif&lt;/pre&gt;&lt;/p&gt;
[quote user="RichardHdrd"]What do I need to do to switch off HFCLK and get the low-power mode?[/quote]
&lt;p&gt;You don&amp;#39;t need to do anything. The Softdevice turns off the HFXO after every RADIO event.&lt;/p&gt;
[quote user="RichardHdrd"]And in my main.c code (dependent on crystal availability), I have:[/quote]
&lt;p&gt;The Softdevice enables the clock with the configuration given in sdk_config.h so you usually don&amp;#39;t have to start the clock yourself in main.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BM833 energy saving</title><link>https://devzone.nordicsemi.com/thread/339866?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 15:17:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcd602c1-bfd1-4b8f-bd0c-5268526a78dd</guid><dc:creator>RichardHdrd</dc:creator><description>&lt;p&gt;Hello Vidar,&lt;/p&gt;
&lt;p&gt;thank you for the initial answere.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s assume I have a 32k crystal, then what should I do:&lt;/p&gt;
&lt;p&gt;known places for settings:&lt;/p&gt;
&lt;pre class="moz-quote-pre"&gt;~\components\softdevice\common\nrf_sdh.c
&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;//without crystal
nrf_clock_lf_cfg_t const clock_lf_cfg =
    {
        .source       = 0,
        .rc_ctiv      = 16,
        .rc_temp_ctiv = 2,
        .accuracy     = 7
    }


//setting with soldered crystal, e.g. nRF52833 DK
nrf_clock_lf_cfg_t const clock_lf_cfg =
    {
        .source       = NRF_SDH_CLOCK_LF_SRC,
        .rc_ctiv      = NRF_SDH_CLOCK_LF_RC_CTIV,
        .rc_temp_ctiv = NRF_SDH_CLOCK_LF_RC_TEMP_CTIV,
        .accuracy     = NRF_SDH_CLOCK_LF_ACCURACY
    }
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;And in my main.c code (dependent on crystal availability), I have:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    #if CRYSTAL_ENABLED == 1
    NRF_CLOCK-&amp;gt;LFCLKSRC            = (CLOCK_LFCLKSRC_SRC_Xtal &amp;lt;&amp;lt; CLOCK_LFCLKSRC_SRC_Pos);
    #else
    NRF_CLOCK-&amp;gt;LFCLKSRC            = (CLOCK_LFCLKSRC_SRC_Synth &amp;lt;&amp;lt; CLOCK_LFCLKSRC_SRC_Pos);
    #endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is that code OK to get LFCLK to use the crystal as source?&lt;/p&gt;
&lt;p&gt;What do I need to do to switch off HFCLK and get the low-power mode?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Richard&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BM833 energy saving</title><link>https://devzone.nordicsemi.com/thread/339858?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 14:49:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d66b542-b39a-446e-ada8-fe0a483328ef</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Richard,&lt;/p&gt;
&lt;p&gt;You should select the internal RC oscillator&amp;nbsp;&lt;span&gt;&lt;a title="32.768 kHz RC oscillator (LFRC)" href="https://infocenter.nordicsemi.com/topic/ps_nrf52833/clock.html?cp=4_1_0_4_3_1_0#concept_acb_q5y_2q"&gt;(LFRC)&lt;/a&gt;&lt;/span&gt; as the clock source if you don&amp;#39;t have a 32 KHz mounted on your board. &lt;span&gt;&lt;a title="32.768 kHz synthesized from HFCLK (LFSYNT)" href="https://infocenter.nordicsemi.com/topic/ps_nrf52833/clock.html?cp=4_1_0_4_3_1_4#concept_zhp_4vy_2q"&gt;LFSYNT&lt;/a&gt; is generally not recommend as it forces the HFXO on and therefore leads to a significantly higher idle current (~500 uA).&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The Softdevice will keep the LF clock running as long as it is enabled for protocol timing. You also need this clock running for the app timer (RTC) to work. However, the system current with the LFCLK running (LFRC/LRXO) is only around&amp;nbsp; 2-3 uA (&lt;a title="Sleep" href="https://infocenter.nordicsemi.com/topic/ps_nrf52833/_tmp/nrf52833/autodita/CURRENT/parameters.i_sleep.html?cp=4_1_0_4_1_0_0"&gt;Sleep&lt;/a&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can use our online power profiler (&lt;a href="https://devzone.nordicsemi.com/power/w/opp/2/online-power-profiler-for-bluetooth-le"&gt;https://devzone.nordicsemi.com/power/w/opp/2/online-power-profiler-for-bluetooth-le&lt;/a&gt;) to estimate the average current when you are in the connected and advertising state. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>