<?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>Spinlock assertion fail on nRF5340 custom board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/127834/spinlock-assertion-fail-on-nrf5340-custom-board</link><description>I use an nRF5340 and nRF7002 on a custom board. My firmware is stable on the nRf7002-DK, but crashes on my custom board most of the time (mostly when connecting to the Cloud or after Wi-Fi provisioning via BLE). 
 
 Logs: 
 
 
 .config file app core:</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Apr 2026 08:28:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/127834/spinlock-assertion-fail-on-nrf5340-custom-board" /><item><title>RE: Spinlock assertion fail on nRF5340 custom board</title><link>https://devzone.nordicsemi.com/thread/565214?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2026 08:28:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd23fa84-4be4-49e8-9ee6-0eae44d9b68f</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am glad to hear that you found a workaround to the issue.&lt;/p&gt;
&lt;p&gt;Let me know if the issue reappears or similar. Hope you have a wonderful day!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Spinlock assertion fail on nRF5340 custom board</title><link>https://devzone.nordicsemi.com/thread/565190?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2026 18:01:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e11bacbc-5c78-4555-a17b-f16dc1a16d20</guid><dc:creator>Michael Crevier</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I checked where the LR address points, but it didn&amp;rsquo;t provide much insight into the root cause:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;pre class="ui-code" data-mode="text"&gt;arm-zephyr-eabi-addr2line.exe -e zephyr\zephyr.elf 0x00070e55
C:/ncs/v3.2.4/zephyr/include/zephyr/spinlock.h:308&lt;/pre&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the meantime, I investigated further and noticed that &lt;code&gt;CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE&lt;/code&gt; was set to 4 instead of 16 (as in the devkit configuration). After adjusting that value and slightly increasing &lt;code&gt;CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE&lt;/code&gt;, this&amp;nbsp;issue appears to be resolved.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Spinlock assertion fail on nRF5340 custom board</title><link>https://devzone.nordicsemi.com/thread/565163?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2026 12:06:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8846462e-b5cb-4f4d-958d-9c991e51b364</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The first part is the originating fault:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:51.429,687] &amp;lt;err&amp;gt; os: ***** BUS FAULT *****
[00:00:51.429,687] &amp;lt;err&amp;gt; os:   Precise data bus error
[00:00:51.429,718] &amp;lt;err&amp;gt; os:   BFAR Address: 0x4
[00:00:51.429,748] &amp;lt;err&amp;gt; os: r0/a1:  0x20001d20  r1/a2:  0x0019b6ff  r2/a3:  0x20000f10
[00:00:51.429,748] &amp;lt;err&amp;gt; os: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x00070e55
[00:00:51.429,779] &amp;lt;err&amp;gt; os:  xpsr:  0x81100225
[00:00:51.429,809] &amp;lt;err&amp;gt; os: s[ 0]:  0x00010000  s[ 1]:  0x00000001  s[ 2]:  0x00000150  s[ 3]:  0x0006f38d
ASSERTION FAIL [z_spin_lock_valid(l)] @ WEST_TOPDIR/zephyr/include/zephyr/spinlock.h:136
        Invalid spinlock 0x2000ba70&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which memory area does &amp;quot;0x2000ba70&amp;quot; belong to according to your build/appname/zephyr/zephyr.map file? This is potentially the thread/stack that is overflowing.&lt;/p&gt;
&lt;p&gt;Also, what function is the LR address pointing towards? use addr2line to resolve this.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>