<?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 MCU the same way as the pinreset command in Zephyr?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82193/how-to-reset-the-mcu-the-same-way-as-the-pinreset-command-in-zephyr</link><description>Hello, 
 
 I have a situation where I would like to reset the MCU (nRF52832) under Zephyr. For the most part I use ```sys_reboot(SYS_REBOOT_COLD)```. However, I would need a different kind of reset. Essentially, I would like to reproduce the &amp;quot;nrfjprog</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Nov 2021 09:36:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82193/how-to-reset-the-mcu-the-same-way-as-the-pinreset-command-in-zephyr" /><item><title>RE: How to reset the MCU the same way as the pinreset command in Zephyr?</title><link>https://devzone.nordicsemi.com/thread/341218?ContentTypeID=1</link><pubDate>Tue, 30 Nov 2021 09:36:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ccb94d2-1bca-4407-86c6-f062130c9dc3</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;The fastest way to trigger a watchdog reset is to configure the watchdog with the minimal reload value (set WDT.CRV to 0xF) and start it, and don&amp;#39;t feed it. That way the WDT will time out after ~458 µs (assuming you don&amp;#39;t enable interrupt on WDT timeout, if so it will be delayed by 2 more 32.768 kHz clock cycles).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reset the MCU the same way as the pinreset command in Zephyr?</title><link>https://devzone.nordicsemi.com/thread/341126?ContentTypeID=1</link><pubDate>Mon, 29 Nov 2021 15:24:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3031606-9557-44e3-ab25-7c26370af6af</guid><dc:creator>mmnano</dc:creator><description>&lt;p&gt;I should have been clearer. I just need something that behaves the same way as a pin reset. Using the table, I can see that watchdog reset would suffice. Is there a way to force one directly ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reset the MCU the same way as the pinreset command in Zephyr?</title><link>https://devzone.nordicsemi.com/thread/341122?ContentTypeID=1</link><pubDate>Mon, 29 Nov 2021 15:15:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fe36704-1afd-4a1e-9738-c8b67b9986dc</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The only way to do a &lt;em&gt;pin&lt;/em&gt; reset from firmware is to connect a GPIO to the reset pin and control it. That is possible, and is for instance done by the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__nrf__dfu__trigger__usb.html"&gt;USB DFU trigger library&lt;/a&gt;&amp;nbsp;in the nRF5 SDK, see &amp;lt;SDK&amp;gt;components\libraries\bootloader\dfu\nrf_dfu_trigger_usb.c. (I mention that as a reference even though it is a different SDK as the code itself here is trivial, just configuring a GPIO as output and clearing it).&lt;/p&gt;
&lt;p&gt;By the way, why do you need a pin reset? You can see how different resets behave differently in the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=4_2_0_17_7#unique_961802881"&gt;reset behavior table&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>