<?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>Enter DFU mode battery-powered not working</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80408/enter-dfu-mode-battery-powered-not-working</link><description>Hi, 
 I currently got the DFU mode working with my nrf52832 while it is being connected to the PC using the Particle Debugger. 
 I use the GPREGRET method and while connected to the PC the device enters the DFU mode as expected by executing this code</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Oct 2021 08:01:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80408/enter-dfu-mode-battery-powered-not-working" /><item><title>RE: Enter DFU mode battery-powered not working</title><link>https://devzone.nordicsemi.com/thread/335213?ContentTypeID=1</link><pubDate>Thu, 21 Oct 2021 08:01:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0de5e25d-bba8-4fef-b9c1-b2770c2d6a4b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Ah, the devices was actually shutting down. My assumption was that the FW was entering a &amp;quot;bad state&amp;quot; and got stuck. Thank you for the update.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enter DFU mode battery-powered not working</title><link>https://devzone.nordicsemi.com/thread/335152?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 18:45:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7efd8cb2-c637-4011-b8bf-cdb3c4f5199e</guid><dc:creator>John1</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Thanks a lot for your help. Using&amp;nbsp;this knowledge I found out that a pin was configured in the wrong way. A specific&amp;nbsp;gpio pin should have been&amp;nbsp;initialized as output pin and set to one, otherwise my device simply shut down. so I had to adapt my code to deal with that. My problem is solved now.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;John&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enter DFU mode battery-powered not working</title><link>https://devzone.nordicsemi.com/thread/334218?ContentTypeID=1</link><pubDate>Thu, 14 Oct 2021 15:32:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b1e2186-6cde-46a3-b6f0-6e60b4347c09</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Great that you have GDB setup ready, that will make further debugging easier if it becomes necessary.&lt;/p&gt;
&lt;p&gt;Yes, you can use &amp;quot;info registers&amp;quot; to read out the registers. The most interesting one now is probably the Program counter (PC). It will tell us where the CPU is executing code from. Based on its address range you can determine if it hangs somewhere in the application or in the bootloader.&lt;/p&gt;
&lt;p&gt;Edit: try to configure gdb to connect to a &amp;laquo;running target&amp;raquo;. Because if you connect and reset it might recover the device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enter DFU mode battery-powered not working</title><link>https://devzone.nordicsemi.com/thread/334214?ContentTypeID=1</link><pubDate>Thu, 14 Oct 2021 15:06:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3ee9a9d-0eea-4900-aa14-b6e8c31a45da</guid><dc:creator>John1</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Nevermind, thanks for your answer! I am not aware of any command line tool specific for that debugger.&lt;/p&gt;
&lt;p&gt;Yes, I have GDB running by following and adapting the following tutorial:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://medium.com/makerdiary/debugging-nrf52-boards-with-visual-studio-code-c1482a759997"&gt;https://medium.com/makerdiary/debugging-nrf52-boards-with-visual-studio-code-c1482a759997&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I assume now I have to&amp;nbsp;use the command &amp;quot;info registers&amp;quot; to have a look at the registers, right? Which ones are of importance here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enter DFU mode battery-powered not working</title><link>https://devzone.nordicsemi.com/thread/334138?ContentTypeID=1</link><pubDate>Thu, 14 Oct 2021 12:04:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a980541-6484-491d-b994-0cf9aeeb8c9d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello John,&lt;/p&gt;
&lt;p&gt;Sorry, I forgot that you were using another debugger. nrfjprog only works with J-link programmers. Is there compatible command line tool for this debugger you can use to read the CPU registers. Alternatively, do you have a setup for debugging with GDB, etc?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enter DFU mode battery-powered not working</title><link>https://devzone.nordicsemi.com/thread/333993?ContentTypeID=1</link><pubDate>Wed, 13 Oct 2021 15:23:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa0d62c2-0264-41b8-8027-598a61027b6c</guid><dc:creator>John1</dc:creator><description>&lt;p&gt;Hello Vidar,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;After installing nrfjprog I tried running your command with no success:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/image-_2800_6_2900_.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As written above I use the Particle Debugger (see here for an image of this debugger:&amp;nbsp;&lt;a href="https://github.com/particle-iot/debugger"&gt;https://github.com/particle-iot/debugger&lt;/a&gt;) to connect my board to the PC via USB. I currently use pyocd to flash the soft device and application, which works fine. I am not 100% sure, but I think pyocd flashes the .hex files using&amp;nbsp;CMSIS-DAP currently.&amp;nbsp;Is there something I have to change in order to be able to use nrfjprog? Or is there an alternative I can use to read the registers?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;John&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enter DFU mode battery-powered not working</title><link>https://devzone.nordicsemi.com/thread/332999?ContentTypeID=1</link><pubDate>Thu, 07 Oct 2021 11:11:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8175c9f5-e8d9-43d2-b5d1-58e4b5144859</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t think of any obvious reasons for this. After the device is &amp;quot;turned off&amp;quot;, could you try to attach the debugger again and read the CPU regs with nrfjprog --readregs to find out what state the chip is in?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>