<?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>Errata: [220] CPU: RAM is not ready when written</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58988/errata-220-cpu-ram-is-not-ready-when-written</link><description>Hi 
 
 Referring to 
 https://devzone.nordicsemi.com/f/nordic-q-a/58652/additional-questions-to-nrf52832-errata-220-clearification/238659#238659 
 From the above post, the following statement was made: 
 
 &amp;quot;You just need to replace the sd_app_evt_wait</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Mar 2020 16:57:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58988/errata-220-cpu-ram-is-not-ready-when-written" /><item><title>RE: Errata: [220] CPU: RAM is not ready when written</title><link>https://devzone.nordicsemi.com/thread/240113?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 16:57:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf970574-9e4e-415c-a30f-fbcae47f7035</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Your welcome, marking this thread as closed with verified answer. If you do not agree, then please reopen this case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Errata: [220] CPU: RAM is not ready when written</title><link>https://devzone.nordicsemi.com/thread/240098?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 16:07:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efac5826-9e75-498d-929f-6925399eb509</guid><dc:creator>Justin</dc:creator><description>&lt;p&gt;Thanks Susheel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Errata: [220] CPU: RAM is not ready when written</title><link>https://devzone.nordicsemi.com/thread/240070?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 14:58:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e9c2af4-79cc-46de-b5f6-411e96ebf91f</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The fix will be included in v8.0 and planned to be released soon. We do not have the privilege to talk about the exact timelines here in devzone channels.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Errata: [220] CPU: RAM is not ready when written</title><link>https://devzone.nordicsemi.com/thread/239802?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2020 17:05:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:407a4559-2708-4c9a-bb49-7bab41565dfd</guid><dc:creator>Justin</dc:creator><description>&lt;p&gt;Thanks Susheel for the information.&lt;/p&gt;
[quote userid="6207" url="~/f/nordic-q-a/58988/errata-220-cpu-ram-is-not-ready-when-written/239729"]sd_app_evt_wait until we include the workaround to patch its implementation in the future SD versions.&amp;nbsp;[/quote]
&lt;p&gt;Do you have idea when will this be included in softdevice and in which version?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Errata: [220] CPU: RAM is not ready when written</title><link>https://devzone.nordicsemi.com/thread/239729?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2020 12:52:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:186f223b-c8f8-4abd-9fa3-6f6a4eecc127</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="johnmjustin"]Does sd_app_evt_wait() perform anything special that __WFE() doesn&amp;#39;t? Like context saving and switching?&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;Yes, sd_app_evt_wait has a mechanism to efficiently register and filter application specific interrupts from softdevice specific interrupts. This means that when your application sleeps using __WFE, it will wakeup for every softdevice specific activity too along with application specific activity. The application will anyways call the __WFE in a loop, but if there is a lot of BLE activity, the application wakeup due to softdevice activity will happen so frequently that the logic to execute the loop becomes significant in power.&lt;/p&gt;
&lt;p&gt;When the application is sleeping using sd_app_evt_wait, the softdevice will never wake the application if the chip was woken due to softdevice only specific activity (internal timers, or RADIO activity dummy packets just to maintain the connection)&lt;/p&gt;
&lt;p&gt;You can do a simple test, take any of our BLE example and replace the sd_app_evt_wait call in it with __WFE and compare the power consumption. You will find that sd_app_evt_wait is more efficient since it is designed to not wake application unless absolutely necessary.&lt;/p&gt;
&lt;p&gt;With this workaround, you cannot use sd_app_evt_wait. The newest SD will fix the sd_app_evt_wait implementation to use the workaround internally. When we fix this, you can in the future&amp;nbsp; use sd_app_evt_wait as usual with all the benefits included&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="johnmjustin"]2. Does Softdevice code use sd_app_evt_wait() or __WFE internally? If yes how to add this workaround over there?[/quote]
&lt;p&gt;the softdevice does not sleep by itself unless the application calls a sleep function. The implementation of sd_app_evt_wait is never called by softdevice and is only called by the application. sd_app_evt_wait uses __WFE internally, that is the reason you cannot use sd_app_evt_wait until we include the workaround to patch its implementation in the future SD versions.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Errata: [220] CPU: RAM is not ready when written</title><link>https://devzone.nordicsemi.com/thread/239609?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2020 19:51:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28a1447b-b8a5-415c-b173-40bdd1a1aae4</guid><dc:creator>Justin</dc:creator><description>&lt;p&gt;Thank you Susheel. This help us lot.&lt;/p&gt;
&lt;p&gt;Additional to above clarification I have following questions.&lt;/p&gt;
&lt;p&gt;1. Does sd_app_evt_wait() perform anything special that __WFE() doesn&amp;#39;t? Like context saving and switching?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. Does Softdevice code use sd_app_evt_wait() or __WFE internally? If yes how to add this workaround over there?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Errata: [220] CPU: RAM is not ready when written</title><link>https://devzone.nordicsemi.com/thread/239518?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2020 12:17:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf5016f3-727b-460a-bfe8-8711ec0bf155</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Justin,&lt;/p&gt;
&lt;p&gt;you just replace the call sd_app_evt_wait() with the&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;SCB-&amp;gt;SCR |= SCB_SCR_SEVONPEND_Msk;
__disable_irq();
__WFE()
__nop();__nop();__nop();__nop();
__enable_irq();&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>