<?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>How to reset the nrf52840 dk board using software in zephyr  i am using nrf mesh light sample code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/125035/how-to-reset-the-nrf52840-dk-board-using-software-in-zephyr-i-am-using-nrf-mesh-light-sample-code</link><description>I am using nrf 52840dk board i need to know how to reset the devlopment using software reset when we press the Button 1 in the nrf 52840dk board 
 1. Give some software reset function example (eg: if i press the Button 1 it need to call this function</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Oct 2025 22:24:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/125035/how-to-reset-the-nrf52840-dk-board-using-software-in-zephyr-i-am-using-nrf-mesh-light-sample-code" /><item><title>RE: How to reset the nrf52840 dk board using software in zephyr  i am using nrf mesh light sample code</title><link>https://devzone.nordicsemi.com/thread/551850?ContentTypeID=1</link><pubDate>Fri, 17 Oct 2025 22:24:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3b6aab0-0017-4bf0-b641-3f5e7a0858ad</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user=""]and if i give s v on command the slave is receving and led is turn on but no reply.&amp;nbsp; can you say what is the root cause and how power disconnect and connect then this issue is fixed , what is the problem and how to solve it ?[/quote]
&lt;p&gt;Since this is your main issue, you need to see which state the slave is. Since all the slave devices are also nRF54840 DK, debugging should not be an issue. Enable logs on those devices and add as much logs as you can to understand the state of the slave device.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/zephyr-apis-latest/page/group_bt_mesh.html#ga69fc65f4e07e6007388473f139e5d8d8"&gt;Here&lt;/a&gt; it says that doing. a mesh reset will need you to reprovision the device into the network. I hope you are doing that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reset the nrf52840 dk board using software in zephyr  i am using nrf mesh light sample code</title><link>https://devzone.nordicsemi.com/thread/551782?ContentTypeID=1</link><pubDate>Fri, 17 Oct 2025 08:06:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:702cd55c-a581-4b22-85e3-3b92a9ae5c04</guid><dc:creator>sibi</dc:creator><description>&lt;div&gt;
&lt;div&gt;&lt;span&gt;i changed the reset function with delay but stil the issue come after 2nd reset&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;// reboot function&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;factory_reset_work_handler&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;k_work&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;work&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;print_uart&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;Factory reset started...&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;/div&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;// Reset Bluetooth Mesh provisioning&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;bt_mesh_reset&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;k_sleep&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;K_MSEC&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;2000&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;print_uart&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;Mesh provisioning reset&lt;/span&gt;&lt;span&gt;\r\n&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;// Delete all stored settings (flash/NVS)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;ret&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;settings_delete&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;&amp;quot;&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;k_sleep&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;K_MSEC&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;2000&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;if&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;ret&lt;/span&gt;&lt;span&gt;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;print_uart&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;Failed to delete settings: &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;ret&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;else&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;print_uart&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;All settings deleted.&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;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&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_sleep&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;K_MSEC&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;2000&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;print_uart&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;Rebooting device...&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;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;//sys_reboot(SYS_REBOOT_COLD);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;sys_reboot&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SYS_REBOOT_WARM&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;p&gt;can you give sample code that reset the nrf mesh ?&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reset the nrf52840 dk board using software in zephyr  i am using nrf mesh light sample code</title><link>https://devzone.nordicsemi.com/thread/551780?ContentTypeID=1</link><pubDate>Fri, 17 Oct 2025 07:53:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:850b3b61-64a2-4e0a-b498-566eeda4003f</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Te problem might be that you are doing sys_reboot right after mesh reset and settings delete, not giving any time for any flash operations to complete if any.&amp;nbsp;&lt;br /&gt;try to make sure that settings is finished with all the activities and add a delay of 100 ms between that and system reset. Something like below&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void do_factory_reset(void)
{
    bt_mesh_reset();
    settings_delete(&amp;quot;whatever you want to delete&amp;quot;);

    settings_save();

    /* Small delay to allow flash backend to finish erase/write operations */
    k_sleep(K_MSEC(100));

    sys_reboot(SYS_REBOOT_COLD);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>