<?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>When / how does nRF52805 Erratum 246 &amp;quot;System: Intermittent extra current
consumption when going to sleep&amp;quot; exactly apply?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76911/when-how-does-nrf52805-erratum-246-system-intermittent-extra-current-consumption-when-going-to-sleep-exactly-apply</link><description>I&amp;#39;ve been checking the nRF52805 Errata document to see which errata apply to our product and do not yet have a workaround implemented in our firmware. 
 Unfortunately, I&amp;#39;m not sure what to make of #246. 
 
 
 Symptoms Extra current consumption in the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Jul 2021 09:01:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76911/when-how-does-nrf52805-erratum-246-system-intermittent-extra-current-consumption-when-going-to-sleep-exactly-apply" /><item><title>RE: When / how does nRF52805 Erratum 246 "System: Intermittent extra current
consumption when going to sleep" exactly apply?</title><link>https://devzone.nordicsemi.com/thread/318125?ContentTypeID=1</link><pubDate>Thu, 01 Jul 2021 09:01:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32573550-676a-4194-becd-f423a29b092f</guid><dc:creator>m.wagner</dc:creator><description>&lt;p&gt;This sounds feasible if IRQs are disabled. A statement from Nordic on this would be useful. Unfortunately, I think they won&amp;#39;t be notified of responses to questions with verified answers, therefore I opened a new question concerning this workaround.&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/77001/possible-alternative-workaround-for-erratum-246-system-intermittent-extra-current-consumption-when-going-to-sleep"&gt;Possible alternative workaround for Erratum 246: &amp;quot;System: Intermittent extra current consumption when going to sleep&amp;quot;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When / how does nRF52805 Erratum 246 "System: Intermittent extra current
consumption when going to sleep" exactly apply?</title><link>https://devzone.nordicsemi.com/thread/318031?ContentTypeID=1</link><pubDate>Wed, 30 Jun 2021 15:41:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ade3153d-4c2e-4553-8fff-cc767b615c93</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;As an improved workaround for errata 246 could we simply precede the &lt;em&gt;__WFE()&lt;/em&gt; with a&amp;nbsp;&lt;em&gt;__DSB()&lt;/em&gt;? This would ensure no high-speed CPU memory access is in progress (including no stack access) and any peripheral 16MHz accesses are then safe to occur during execution of WFE thereby removing the conditions for the bug.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define __WFE() __ASM volatile (&amp;quot;wfe&amp;quot;)
// Ensure all explicit memory accesses before this instruction complete
#define __DSB() __ASM volatile (&amp;quot;dsb 0xF&amp;quot;:::&amp;quot;memory&amp;quot;)
  
ENABLE_WAKEUP_SOURCE -&amp;gt; SEVONPEND -&amp;gt; DISABLE_INTERRUPTS -&amp;gt; __DSB -&amp;gt; __WFE -&amp;gt; WAKEUP inside __WFE -&amp;gt; ENABLE_interrupts -&amp;gt; WAKEUP_SOURCE_ISR&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Note the &lt;em&gt;__DSB()&lt;/em&gt; should be redefined as a macro and not the current inline function definition which may not execute as desired under some compiler settings; a non-inline function call would mess up the intent of this workaround with an unwanted memory-accessing stack pop.&lt;/p&gt;
&lt;p&gt;Edit: If running code from RAM instead of FLASH an &lt;em&gt;__ISB()&lt;/em&gt; should probably be added immediately before &lt;em&gt;__DSB()&lt;/em&gt;; this does not apply to cache I don&amp;#39;t think as that is separate memory.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When / how does nRF52805 Erratum 246 "System: Intermittent extra current
consumption when going to sleep" exactly apply?</title><link>https://devzone.nordicsemi.com/thread/317998?ContentTypeID=1</link><pubDate>Wed, 30 Jun 2021 13:24:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:925088e6-713b-4828-b00b-64f535ba7e9a</guid><dc:creator>m.wagner</dc:creator><description>&lt;p&gt;Okay, thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When / how does nRF52805 Erratum 246 "System: Intermittent extra current
consumption when going to sleep" exactly apply?</title><link>https://devzone.nordicsemi.com/thread/317997?ContentTypeID=1</link><pubDate>Wed, 30 Jun 2021 13:23:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61376c43-e81a-4458-8182-7cdb562b662b</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>[quote user="m.wagner"]With the workaround enabled, does the extra current consumption occur constantly while the the 16MHz bus is active or also intermittently, in cases where otherwise higher current consumption would have resulted?[/quote]
&lt;p&gt;&amp;nbsp;It will always occur when the 16MHz bus is active. This is typically during transactions when the RAM is updated with the incoming peripheral data, using DMA.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="m.wagner"]How is this workaround able to shut down the 16MHz clock?[/quote]
&lt;p&gt;&amp;nbsp;This is very complex and I can&amp;#39;t share the details, but the workaround does not shut down the 16MHz clock, it just removes one of several conditions necessary to trigger this bug.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When / how does nRF52805 Erratum 246 "System: Intermittent extra current
consumption when going to sleep" exactly apply?</title><link>https://devzone.nordicsemi.com/thread/317968?ContentTypeID=1</link><pubDate>Wed, 30 Jun 2021 12:24:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:867a5518-f32d-4ed1-886f-562b000f25f1</guid><dc:creator>m.wagner</dc:creator><description>&lt;p&gt;Hi Stian,&lt;/p&gt;
&lt;p&gt;Thanks for the clarification. In that case I will enable the workaround.&lt;/p&gt;
&lt;p&gt;I agree, that this does not seem to be very noticeable while the 16MHz bus is active.&lt;/p&gt;
&lt;p&gt;With the workaround enabled, does the extra current consumption occur constantly while the the 16MHz bus is active or also intermittently, in cases where otherwise higher current consumption would have resulted?&lt;/p&gt;
&lt;p&gt;How is this workaround able to shut down the 16MHz clock?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When / how does nRF52805 Erratum 246 "System: Intermittent extra current
consumption when going to sleep" exactly apply?</title><link>https://devzone.nordicsemi.com/thread/317959?ContentTypeID=1</link><pubDate>Wed, 30 Jun 2021 12:18:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d20c3a94-baff-4df6-82e2-cdc075a53466</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi, sorry if you think the errata is confusing. The short story is that the workaround should always be enabled, and I&amp;#39;m not sure why it&amp;#39;s not part of the MDK already, leaving it non-optional. I will have to investigate that. &lt;/p&gt;
&lt;p&gt;The workaround only results in a worst case of 40 uA extra current consumption on top of the 16MHz bus current, which is already in the 1 mA range, and only when the 16MHz bus is active. So you will barely notice it.&lt;/p&gt;
&lt;p&gt;The high-speed vs low-speed phrasing is because of the DMA bus, which has a fast side and a slow side. The fast side refers to the CPU, and the slow side refers to all other peripherals using the 16MHz bus and DMA. I agree that this is not very obvious.&lt;/p&gt;
&lt;p&gt;The increased current is due to the 16MHz clock not being released after use by the peripheral. A very specific set of conditions on the bus are necessary for this to happen, so it&amp;#39;s very unlikely to happen. The symptom is that the current consumption stays high after the peripheral usage, and will stay high during the system ON idle period, until the next DMA transaction, which will then release the clock. For example, if you set up regular sampling on the SAADC, the current may increase to 350 uA after one sampling event, and stay high until the next sampling event. It happens intermittently, without any way for the application to know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>