<?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>nrf5340: Halt on bus fault instead of reset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98360/nrf5340-halt-on-bus-fault-instead-of-reset</link><description>Good afternoon. 
 Hopefully a simple config-related question. 
 We have an nrf Connect 1.6.1 SDK-based app which performs simultaneous ble advertising and scanning. We have been chasing a ghost where the module becomes unresponsive a small percentage</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 16 Feb 2024 16:30:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98360/nrf5340-halt-on-bus-fault-instead-of-reset" /><item><title>RE: nrf5340: Halt on bus fault instead of reset</title><link>https://devzone.nordicsemi.com/thread/469313?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2024 16:30:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbdd10d5-ddf9-4cef-889e-f2fde9b98360</guid><dc:creator>Andrew-</dc:creator><description>&lt;p&gt;If anyone else has this problem, in a non-secure build you will need to access the non-secure (POWER_NS) version of the register at address &lt;span&gt;&lt;em&gt;0x40005618ul&lt;/em&gt; rather than &lt;em&gt;0x50005618ul&lt;/em&gt; to stop getting a security assert and constant reboot. &lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340: Halt on bus fault instead of reset</title><link>https://devzone.nordicsemi.com/thread/423844?ContentTypeID=1</link><pubDate>Thu, 04 May 2023 15:56:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:106b1dc6-abbe-4d43-ad08-c15b1edd530a</guid><dc:creator>GerardB</dc:creator><description>&lt;p&gt;Hi Mike&lt;br /&gt;&lt;br /&gt;We would also like to implement errata 161 on our nrf5340 project (we are using SDK v2.3.0) - but despite this post it is not clear to me how to do this!&lt;br /&gt;&lt;br /&gt;Questions for you:&lt;br /&gt;&lt;br /&gt;Did you ever resolve this issue (i.e: did it work when you &amp;quot;simply&amp;quot; changed the nrf_reset_h file directly, without changing anything else)?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Would really appreciate your help/feedback.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Gerard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340: Halt on bus fault instead of reset</title><link>https://devzone.nordicsemi.com/thread/421955?ContentTypeID=1</link><pubDate>Mon, 24 Apr 2023 08:01:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1b24dde-82fd-4dc8-915e-4ceaa4362fab</guid><dc:creator>Kenneth</dc:creator><description>[quote user="MikeVM"]Should I leave board.c&amp;#39;s initialization alone and just patch nrf_reset.h with the expectation that something is invoking nrf_reset_network_force_off? Confused.[/quote]
&lt;p&gt;Sounds like a good idea. But to understand more about&amp;nbsp;the cause of the error here you can add the following to you application prj.conf:&lt;/p&gt;
&lt;p&gt;CONFIG_ASSERT=y&lt;br /&gt;CONFIG_ASSERT_VERBOSE=y&lt;br /&gt;CONFIG_ASSERT_NO_COND_INFO=n&lt;br /&gt;CONFIG_ASSERT_NO_MSG_INFO=n&lt;br /&gt;CONFIG_RESET_ON_FATAL_ERROR=n&lt;br /&gt;CONFIG_THREAD_NAME=y&lt;/p&gt;
&lt;p&gt;I suspect the problem is that the code is executed from nonsecure environment, and this cause a security exception that reset the system.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340: Halt on bus fault instead of reset</title><link>https://devzone.nordicsemi.com/thread/421783?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 13:47:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c20a591-d543-4717-af28-69825cd08584</guid><dc:creator>Mike Mascari</dc:creator><description>&lt;p&gt;Hi Kenneth.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Our board initialization code&amp;nbsp;invoked by SYS_INIT at POST_KERNEL was doing:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_RESET-&amp;gt;NETWORK.FORCEOFF = RESET_NETWORK_FORCEOFF_FORCEOFF_Release;&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When we replaced that with the 161 errata from nrf_reset.h:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	*(volatile uint32_t *)0x50005618UL = 1UL;
        NRF_RESET-&amp;gt;NETWORK.FORCEOFF = RESET_NETWORK_FORCEOFF_FORCEOFF_Release &amp;lt;&amp;lt;
	  RESET_NETWORK_FORCEOFF_FORCEOFF_Pos;
        NRFX_DELAY_US(5);
        NRF_RESET-&amp;gt;NETWORK.FORCEOFF = RESET_NETWORK_FORCEOFF_FORCEOFF_Hold &amp;lt;&amp;lt;
	  RESET_NETWORK_FORCEOFF_FORCEOFF_Pos;
        NRFX_DELAY_US(1);
        NRF_RESET-&amp;gt;NETWORK.FORCEOFF = RESET_NETWORK_FORCEOFF_FORCEOFF_Release &amp;lt;&amp;lt;
	  RESET_NETWORK_FORCEOFF_FORCEOFF_Pos;
        *(volatile uint32_t *)0x50005618UL = 0UL;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;the board continually reboots. Should I leave board.c&amp;#39;s initialization alone and just patch nrf_reset.h with the expectation that something is invoking nrf_reset_network_force_off? Confused.&lt;/p&gt;
&lt;p&gt;- Mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340: Halt on bus fault instead of reset</title><link>https://devzone.nordicsemi.com/thread/421208?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2023 09:27:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48700e3c-b05b-433f-987c-bbc20f3c66ce</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Regarding implementing errata 161:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF5340_Rev1/ERR/nRF5340/Rev1/latest/anomaly_340_161.html"&gt;https://infocenter.nordicsemi.com/topic/errata_nRF5340_Rev1/ERR/nRF5340/Rev1/latest/anomaly_340_161.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The errata says you should replace the following code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_RESET-&amp;gt;NETWORK.FORCEOFF = RESET_NETWORK_FORCEOFF_FORCEOFF_Release;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;with the following&lt;/p&gt;
&lt;pre&gt;&lt;pre class="ui-code" data-mode="text"&gt;*(volatile uint32_t *) 0x50005618ul = 1ul;
NRF_RESET-&amp;gt;NETWORK.FORCEOFF = (RESET_NETWORK_FORCEOFF_FORCEOFF_Release &amp;lt;&amp;lt; RESET_NETWORK_FORCEOFF_FORCEOFF_Pos);
delay_us(5); // Wait for at least five microseconds
NRF_RESET-&amp;gt;NETWORK.FORCEOFF = (RESET_NETWORK_FORCEOFF_FORCEOFF_Hold &amp;lt;&amp;lt; RESET_NETWORK_FORCEOFF_FORCEOFF_Pos);
delay_us(1); // Wait for at least one microsecond
NRF_RESET-&amp;gt;NETWORK.FORCEOFF = (RESET_NETWORK_FORCEOFF_FORCEOFF_Release &amp;lt;&amp;lt; RESET_NETWORK_FORCEOFF_FORCEOFF_Pos);
*(volatile uint32_t *) 0x50005618ul = 0ul;&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;I can see this require one change, for the board file (will depend on the board you have): &lt;br /&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/arm/nrf5340dk_nrf5340/nrf5340_cpunet_reset.c#L52"&gt;&lt;/a&gt; &lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/master/hal/nrf_reset.h#L137"&gt;https://github.com/NordicSemiconductor/nrfx/blob/master/hal/nrf_reset.h#L137&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regarding implementing errata 160:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF5340_Rev1/ERR/nRF5340/Rev1/latest/anomaly_340_160.html"&gt;https://infocenter.nordicsemi.com/topic/errata_nRF5340_Rev1/ERR/nRF5340/Rev1/latest/anomaly_340_160.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can see this require two changes:&lt;br /&gt;&lt;a href="https://github.com/nrfconnect/nrfx/blob/master/mdk/system_nrf5340_application.c#L172"&gt;https://github.com/nrfconnect/nrfx/blob/master/mdk/system_nrf5340_application.c#L172&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;a href="https://github.com/nrfconnect/nrfx/blob/master/mdk/system_nrf5340_network.c#L85"&gt;https://github.com/nrfconnect/nrfx/blob/master/mdk/system_nrf5340_network.c#L85&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340: Halt on bus fault instead of reset</title><link>https://devzone.nordicsemi.com/thread/420234?ContentTypeID=1</link><pubDate>Thu, 13 Apr 2023 12:05:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a7d506b-3b4a-48ae-89f5-12bf666dc805</guid><dc:creator>Mike Mascari</dc:creator><description>&lt;p&gt;Thank you Kenneth.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I attempted to migrate our app code to the latest nRF Connect SDK, but ran into challenges. Sorry to ask for hand-holding, but could you tell me which files in 1.6.1 should have the code added as specified in the 160 and 161 errata? Not sure exactly where to drop in those lines.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340: Halt on bus fault instead of reset</title><link>https://devzone.nordicsemi.com/thread/418824?ContentTypeID=1</link><pubDate>Mon, 03 Apr 2023 11:15:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:767e3073-6932-4624-bbfd-8abd2ade8c74</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You are working on a rather old nRF Connect SDK, but please try to implement these two workarounds:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF5340_Rev1/ERR/nRF5340/Rev1/latest/anomaly_340_160.html"&gt;https://infocenter.nordicsemi.com/topic/errata_nRF5340_Rev1/ERR/nRF5340/Rev1/latest/anomaly_340_160.html&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF5340_Rev1/ERR/nRF5340/Rev1/latest/anomaly_340_161.html"&gt;https://infocenter.nordicsemi.com/topic/errata_nRF5340_Rev1/ERR/nRF5340/Rev1/latest/anomaly_340_161.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>