<?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 ble secure fault</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110307/nrf5340-ble-secure-fault</link><description>My setup is a custom board with a nrf5340 which acts as the BLE Central and SDK 2.6.99. When I use a 52833 DK as the peripheral which has the BAS service I can connect and pair using OOB pairing and receive the BAS notifications. But when I use the 5340</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Apr 2024 07:43:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110307/nrf5340-ble-secure-fault" /><item><title>RE: nrf5340 ble secure fault</title><link>https://devzone.nordicsemi.com/thread/479612?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 07:43:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de875ca3-bf01-4d87-9f30-37c92f648c5c</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;Thank you for updating and sharing the root cause.&lt;/p&gt;
&lt;p&gt;Let us know if you run into any more issues or have questions.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope you have a wonderful weekend!&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: nrf5340 ble secure fault</title><link>https://devzone.nordicsemi.com/thread/479502?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 15:00:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b65a7d5-a9e5-4cde-bc97-6dc463861028</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;The FAULT doesn&amp;#39;t occur when I remove the&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;k_poll_signal_raise(&amp;amp;pair_signal, 0);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Turns out I&amp;#39;m not init&amp;#39;ing the signal properly which was causing the FAULT. Thanks for the help!&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 ble secure fault</title><link>https://devzone.nordicsemi.com/thread/479466?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 13:49:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:918d6af0-1bda-4337-93df-1e8afe8a132d</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;I bumped up these in prj.conf:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_HEAP_MEM_POOL_SIZE&lt;/span&gt;&lt;span&gt;=4096&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_MAIN_STACK_SIZE&lt;/span&gt;&lt;span&gt;=4096&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE&lt;/span&gt;&lt;span&gt;=4096&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Unfortunately it had no effect. Same fault.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;[00:00:09.926,055] &amp;lt;inf&amp;gt; ble_supv: Regular advertising started&lt;br /&gt;&lt;br /&gt;[00:00:10.045,867] &amp;lt;inf&amp;gt; ble_supv: Connected&lt;br /&gt;[00:00:10.498,596] &amp;lt;inf&amp;gt; ble_supv: LESC OOB data requested&lt;br /&gt;&lt;br /&gt;[00:00:11.100,372] &amp;lt;inf&amp;gt; ble_supv: Pairing completed: D1:3A:F6:65:C0:9C (random), bonded: 1&lt;br /&gt;&lt;br /&gt;[00:00:11.100,372] &amp;lt;err&amp;gt; os: ***** BUS FAULT *****&lt;br /&gt;[00:00:11.100,372] &amp;lt;err&amp;gt; os: Precise data bus error&lt;br /&gt;[00:00:11.100,372] &amp;lt;err&amp;gt; os: BFAR Address: 0x4559&lt;br /&gt;[00:00:11.100,402] &amp;lt;err&amp;gt; os: r0/a1: 0x00000000 r1/a2: 0x00000001 r2/a3: 0x00004559&lt;br /&gt;[00:00:11.100,402] &amp;lt;err&amp;gt; os: r3/a4: 0x20008ea8 r12/ip: 0x00000000 r14/lr: 0x00000edb&lt;br /&gt;[00:00:11.100,433] &amp;lt;err&amp;gt; os: xpsr: 0x21000000&lt;br /&gt;[00:00:11.100,433] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x0001397e&lt;br /&gt;[00:00:11.100,463] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 25: Unknown error on CPU 0&lt;br /&gt;[00:00:11.100,494] &amp;lt;err&amp;gt; os: Current thread: 0x20001828 (unknown)&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 ble secure fault</title><link>https://devzone.nordicsemi.com/thread/479455?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 13:25:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d1238df-97b7-4006-8cc9-d96aaa60017e</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Try to increase the workqueue stack size, by&amp;nbsp;adjusting this configuration?&amp;nbsp;CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;H&amp;aring;kon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 ble secure fault</title><link>https://devzone.nordicsemi.com/thread/479428?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 12:35:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f9e102d-ad19-4e55-ab26-30add08d71f5</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;Here&amp;#39;s line 213. Keep in mind this is OOB pairing over UART which is successful with the nrf52833 DK but for this I am using the nrf5340 which doesn&amp;#39;t work with the same code.&amp;nbsp; This code was based off of the NFC OOB pairing sample which is very similar and identical in this function.&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1713443696078v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 ble secure fault</title><link>https://devzone.nordicsemi.com/thread/479425?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 12:26:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abb28a8d-3dc8-4055-ae18-9af78d5b5e6d</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;Here&amp;#39;s the results:&lt;br /&gt;PC&lt;br /&gt;Cmd: addr2line 0x000138c6&lt;br /&gt;Output: zephyr/include/zephyr/sys/dlist.h:509&lt;/p&gt;
&lt;p&gt;LR&lt;br /&gt;Cmd: addr2line 0x00000edb&lt;/p&gt;
&lt;p&gt;Output: src/ble_supervisor.c:213&lt;/p&gt;
&lt;p&gt;Thread:&lt;br /&gt;.bss.bt_workq&amp;nbsp; 0x00000000200015c8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0xa0 zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a(hci_core.c.obj)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 ble secure fault</title><link>https://devzone.nordicsemi.com/thread/479417?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 12:05:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96019f08-33e8-4694-bdb3-0de5dfe7bc41</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;In order to find the source of the assertion, you should map the faulting address(es) to your source code, using addr2line, as explained in here from &lt;strong&gt;step 12&lt;/strong&gt; and down:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-2-debugging/topic/exercise-2-11/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-2-debugging/topic/exercise-2-11/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then you can also search for the &amp;quot;current thread&amp;quot; in your build-folder/zephyr/zephyr.map file, but omit the &amp;quot;0x&amp;quot; when searching (example: 0x200015c8 -&amp;gt; 200015c8).&lt;/p&gt;
&lt;p&gt;This way, you can see which thread the assert came from.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you do this and post the results of addr2line on &amp;quot;LR&amp;quot; and &amp;quot;PC&amp;quot;?&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: nrf5340 ble secure fault</title><link>https://devzone.nordicsemi.com/thread/479403?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 11:33:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4217a3b-d3f4-46f4-a625-f46be45588a5</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;Here&amp;#39;s the updated fault that occurs after I&amp;#39;m told the pairing is complete.:&lt;/p&gt;
&lt;p&gt;[00:00:06.681,945] &amp;lt;inf&amp;gt; ble_supv: Regular advertising started&lt;/p&gt;
&lt;p&gt;[00:00:06.789,520] &amp;lt;inf&amp;gt; ble_supv: Connected&lt;br /&gt;[00:00:07.242,218] &amp;lt;inf&amp;gt; ble_supv: LESC OOB data requested&lt;/p&gt;
&lt;p&gt;[00:00:07.843,933] &amp;lt;inf&amp;gt; ble_supv: Pairing completed: D1:3A:F6:65:C0:9C (random) , bonded: 1&lt;/p&gt;
&lt;p&gt;[00:00:07.843,963] &amp;lt;err&amp;gt; os: ***** BUS FAULT *****&lt;br /&gt;[00:00:07.843,963] &amp;lt;err&amp;gt; os: Precise data bus error&lt;br /&gt;[00:00:07.843,963] &amp;lt;err&amp;gt; os: BFAR Address: 0x4559&lt;br /&gt;[00:00:07.843,994] &amp;lt;err&amp;gt; os: r0/a1: 0x00000000 r1/a2: 0x00000001 r2/a3: 0x0 0004559&lt;br /&gt;[00:00:07.843,994] &amp;lt;err&amp;gt; os: r3/a4: 0x20005988 r12/ip: 0x00000000 r14/lr: 0x0 0000edb&lt;br /&gt;[00:00:07.843,994] &amp;lt;err&amp;gt; os: xpsr: 0x21000000&lt;br /&gt;[00:00:07.843,994] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x000138c6&lt;br /&gt;[00:00:07.844,024] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 25: Unknown error on CPU 0&lt;br /&gt;[00:00:07.844,085] &amp;lt;err&amp;gt; os: Current thread: 0x200015c8 (unknown)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The pairing complete callback where the log statement occurs and the bus fault seems to occur:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;pairing_complete&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;bt_conn&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;conn&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;bool&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;bonded&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;char&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;addr&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;BT_ADDR_LE_STR_LEN&lt;/span&gt;&lt;span&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;bt_addr_le_to_str&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;bt_conn_get_dst&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;conn&lt;/span&gt;&lt;span&gt;), &lt;/span&gt;&lt;span&gt;addr&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;sizeof&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;addr&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;LOG_INF&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;Pairing completed: &lt;/span&gt;&lt;span&gt;%s&lt;/span&gt;&lt;span&gt;, bonded: &lt;/span&gt;&lt;span&gt;%d&lt;/span&gt;&lt;span&gt;\n&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;addr&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;bonded&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;k_poll_signal_raise&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;pair_signal&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;bt_le_oob_set_sc_flag&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;false&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;bt_le_oob_set_legacy_flag&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;false&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 ble secure fault</title><link>https://devzone.nordicsemi.com/thread/479299?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 18:01:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4144943c-7da9-4869-9ab3-5487959e3ab2</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;I have changed the dts from _ns to nrf5340dk_nrf5340_cpuapp.dts and am no longer seeing the SECURE FAULT to try to isolate it to whether it is a TFM issue.&amp;nbsp; Here&amp;#39;s the new fault which occurs at exactly the same location when the BLE pairs:&lt;/p&gt;
&lt;p&gt;[00:00:06.844,848] &amp;lt;inf&amp;gt; ble_supv: Pairing completed: D1:3A:F6:65:C0:9C (random), bonded: 1&lt;/p&gt;
&lt;p&gt;[00:00:06.844,879] &amp;lt;err&amp;gt; os: ***** BUS FAULT *****&lt;br /&gt;[00:00:06.844,879] &amp;lt;err&amp;gt; os: Precise data bus error&lt;br /&gt;[00:00:06.844,909] &amp;lt;err&amp;gt; os: BFAR Address: 0x4559&lt;br /&gt;[00:00:06.844,909] &amp;lt;err&amp;gt; os: r0/a1: 0x00000000 r1/a2: 0x00000001 r2/a3: 0x00004559&lt;br /&gt;[00:00:06.844,909] &amp;lt;err&amp;gt; os: r3/a4: 0x20005988 r12/ip: 0x20001808 r14/lr: 0x00000edb&lt;br /&gt;[00:00:06.844,940] &amp;lt;err&amp;gt; os: xpsr: 0x21000000&lt;br /&gt;[00:00:06.844,940] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x000138c6&lt;br /&gt;[00:00:06.844,970] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 25: Unknown error on CPU 0&lt;br /&gt;[00:00:06.845,001] &amp;lt;err&amp;gt; os: Current thread: 0x200015c8 (unknown)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>