<?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>nRF52840 debugger launches into DfuTarg mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83214/nrf52840-debugger-launches-into-dfutarg-mode</link><description>I have been having nothing but problems since moving to the nRF52840 and using Segger Embedded Studio. 
 I have built a project that uses the soft device, my application, and the secure Bootloader (buttonless DFU). 
 A similar project on the nRF52832</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Dec 2021 18:20:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83214/nrf52840-debugger-launches-into-dfutarg-mode" /><item><title>RE: nRF52840 debugger launches into DfuTarg mode</title><link>https://devzone.nordicsemi.com/thread/345510?ContentTypeID=1</link><pubDate>Thu, 30 Dec 2021 18:20:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72ff6bcc-f95d-46b7-b596-244d35c1cfc8</guid><dc:creator>bojennett</dc:creator><description>&lt;p&gt;Hung Bui...&lt;/p&gt;
&lt;p&gt;Thank you for this information. &amp;nbsp;I will look into this. &amp;nbsp;The Bootloader was delivered to us by a third party so I don&amp;#39;t have access to that source code. &amp;nbsp;Your statement about this check rings a bell to me, though I don&amp;#39;t actively remember doing this on my 82532 projects. &amp;nbsp;But maybe I did. &amp;nbsp;I don&amp;#39;t know if I will be able to get this in the next couple of days, but I will look into it and let you know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 debugger launches into DfuTarg mode</title><link>https://devzone.nordicsemi.com/thread/345481?ContentTypeID=1</link><pubDate>Thu, 30 Dec 2021 13:35:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7a7ee9f-f926-4990-a57c-a1ab9d5e5436</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Josesh,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I believe it&amp;#39;s not a bug but a feature.&amp;nbsp;&lt;br /&gt;If you have a look inside&amp;nbsp;dfu_enter_check() function in nrf_bootloader.c you can find the check for CRC match in app_is_valid()&lt;br /&gt;This is to prevent the application to be modified unexpectedly. In your case when you flash a new application directly the bootloader will detect that as the CRC won&amp;#39;t match and it will stay in DFUTarg mode.&amp;nbsp;&lt;br /&gt;If you update the application via the bootloader instead, you wouldn&amp;#39;t have any problem with that as the bootloader will update a new CRC matches with the new application.&amp;nbsp;&lt;br /&gt;For development you can comment out the check for CRC in the bootloader , or use a flag/button or something in flash to skip the check, or generate bootloader setting to overwrite the CRC value to the correct value.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;if (!app_is_valid(crc_on_valid_app_required()))&lt;br /&gt; {&lt;br /&gt; NRF_LOG_DEBUG(&amp;quot;DFU mode because app is not valid.&amp;quot;);&lt;br /&gt; return true;&lt;br /&gt; }&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 debugger launches into DfuTarg mode</title><link>https://devzone.nordicsemi.com/thread/345417?ContentTypeID=1</link><pubDate>Thu, 30 Dec 2021 02:59:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b829453a-f02e-481e-ab31-80e17f48b63a</guid><dc:creator>bojennett</dc:creator><description>&lt;p&gt;The thing that seems reproducible is this:&lt;br /&gt;&lt;br /&gt;1) Make changes to application, compile it&lt;br /&gt;2) Run the nrfutil steps to make the hex file.&lt;br /&gt;3) Install the hex file via JFlashLite&lt;br /&gt;4) Go back into Segger Embedded Studio, and then run the debugger&lt;br /&gt;&lt;br /&gt;If I do that, then the latest changes I made work - I can see them in the debugger.&lt;br /&gt;&lt;br /&gt;But if I change the application and just install it over the current application (without reflashing it manually), then it boots into the Bootloader only.&lt;br /&gt;&lt;br /&gt;So, if I &amp;quot;debug&amp;quot; over the application I just flashed manually, I&amp;#39;m fine. &amp;nbsp;But if I &amp;quot;debug&amp;quot; something new over the older application, it only goes into Bootloader mode and stays there.&lt;br /&gt;&lt;br /&gt;This feels like a tool issue. &amp;nbsp;It cannot be my application, because I can build a hex just fine (also, I can OTA over it just fine). &amp;nbsp;So the application is fine. &amp;nbsp;But there is something weird with trying to debug... something that I *never* experienced with the 52832 or the 51822, &amp;nbsp;Only started when I went to the 52840&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>