<?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>Hardfault after reboot</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105958/hardfault-after-reboot</link><description>Hi, 
 I run into an error which seems not to be resolved easily. 
 Setup: 
 NRF52840 DK 
 NRF Mesh SDK 5.0 (i know its no longer maintained) provisioner example + User Code, 
 
 What happens: 
 Download of example runs fine, then provisioning of Nodes</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 01 Dec 2023 10:26:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105958/hardfault-after-reboot" /><item><title>RE: Hardfault after reboot</title><link>https://devzone.nordicsemi.com/thread/458476?ContentTypeID=1</link><pubDate>Fri, 01 Dec 2023 10:26:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ed51bd3-543a-4f45-a780-66369f6c6915</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In order to ensure valid address handles, you should use &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v5.0.0%2Fgroup__DEVICE__STATE__MANAGER__ADDRESSES.html&amp;amp;anchor=ga3a7d028f1b82524bbee08a8967d6c348"&gt;dsm_address_get_all()&lt;/a&gt; for fetching the handles into a list of handles, and the p_count will reflect the number of valid handles in that list after the call to dsm_address_get_all() returns.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault after reboot</title><link>https://devzone.nordicsemi.com/thread/458218?ContentTypeID=1</link><pubDate>Thu, 30 Nov 2023 06:37:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f60a209c-cc34-409e-9290-5aebc71f56a1</guid><dc:creator>Simsim</dc:creator><description>&lt;p&gt;Hi, Terje&lt;/p&gt;
&lt;p&gt;I could find out what called the hardfault, i was printing all the Adresses form the DSM&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; dsm_address_get(alladressHandle, &amp;amp;localaddress);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;which points to non valid memory.&lt;/p&gt;
&lt;p&gt;By enlarge the DSM_SUBNET_MAX&amp;nbsp; from 4 to 40 the hardfault does no more occure.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But i think this is not the real soultion for this, while i use only one subnet, so i will post here if i find the root of this.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault after reboot</title><link>https://devzone.nordicsemi.com/thread/457227?ContentTypeID=1</link><pubDate>Thu, 23 Nov 2023 16:57:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef8bf1d8-386f-4ea0-a43e-183516c89f8b</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is no strong connection to the SoftDevice with flash storage used for provisioning data in the nRF5 SDK for Mesh. In fact, the SoftDevice does not directly handle Bluetooth Mesh either.&lt;/p&gt;
&lt;p&gt;Bluetooth Mesh is built on top of BLE, so the provisioning (which is purely a Bluetooth Mesh concept) is part of the Bluetooth Mesh stack, which is provided as source code form in the SDK and compiled into the application.&lt;/p&gt;
&lt;p&gt;In the Bluetooth Mesh stack, data storage is handled by the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v5.0.0%2Fgroup__DEVICE__STATE__MANAGER.html"&gt;Device State Manager&lt;/a&gt; module, which again uses the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v5.0.0%2Fmd_doc_user_guide_modules_flash_manager.html"&gt;Flash manager&lt;/a&gt; module (also part of nRF5 SDK for Mesh) for the actual storage.&lt;/p&gt;
&lt;p&gt;The Flash manager module then does the direct flash operations, and uses the SoftDevice API for that (since the SoftDevice because of time critical operation needs to control when (time consuming) flash operations are scheduled.)&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault after reboot</title><link>https://devzone.nordicsemi.com/thread/457069?ContentTypeID=1</link><pubDate>Thu, 23 Nov 2023 07:06:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca7acaef-ab52-441b-b51c-ba30f27091d8</guid><dc:creator>Simsim</dc:creator><description>&lt;p&gt;Hi Terje&lt;/p&gt;
&lt;p&gt;Thanks for the insights, i could pin down with ozone the Error, it comes from a not enabled Busfault which rises a hardfault.&lt;/p&gt;
&lt;p&gt;So i had to look deeper into the code.&lt;/p&gt;
&lt;p&gt;Can you give me some information about storing of the provisioner data into the softdevice (not the mesh config file ) since i had disabled them and it seems that the Softdevice still starts up provisioned and load configuration of handels and dsm addreses and so on. So i guess there is another memory for the configuration of this part.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault after reboot</title><link>https://devzone.nordicsemi.com/thread/457028?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2023 19:57:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdda80b5-c2f5-444a-97a5-79f70ffd1144</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Step by step debugging is not expected to work as long as there is a SoftDevice involved, since then a hardfault is expected. (The SoftDevice faults if it detects that certain timing constraints are not held.) Even though the Bluetooth Mesh stack in the nRF5 SDK does not use the SoftDevice for the ADV bearer, it does use the SoftDevice for the GATT bearer. Therefore, there is a SoftDevice involved.&lt;/p&gt;
&lt;p&gt;What this means, is, if doing a debug session, you can only do one breakpoint. When that breakpoint is reached and code execution is halted, the stack is expected to crash once resumed. Debug options are therefore limited. Print debugging may in many instances be more effective.&lt;/p&gt;
&lt;p&gt;When provisioning fails, do you get log output of the devices involved? (Both provisionee and provisioner.) There is not much to go on there, apart from the step debugging (expectedly) failing with hardfault. The error is most likely elsewhere.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>