<?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>DFU not working</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45834/dfu-not-working</link><description>SDK 15.2 API 6.10 SES custom board 
 I am trying to get DFU to work and it is not seeming to work right. 
 I am trying to engage DFU mode by holding in button on board for 10-20 seconds. after releasing during allotted time i call enter_dfu_mode() 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Apr 2019 14:30:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45834/dfu-not-working" /><item><title>RE: DFU not working</title><link>https://devzone.nordicsemi.com/thread/183867?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 14:30:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ce3d366-f314-4877-84f4-9b88d22b15db</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Segger RTT uses a control block in RAM to store the loggin data.&amp;nbsp;When you jump to the bootloader, you are resetting the device and the bootloader code is reinitializing the RAM, which means that the RTT control block placed at a different location. So this is why you do not see any more log output after starting the DFU.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My suggestion would be to start the Bootloader in debug session, countinue the execution so that the application starts up and then trigger DFU. You should then see all the log data from the bootloader during the DFU.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you check if&amp;nbsp;nrf_bootloader_app_start is being called? If it is then it means that the bootloader has passed execution to the new application and if the device is not responding then the fault is in the new application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU not working</title><link>https://devzone.nordicsemi.com/thread/183568?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2019 15:23:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca8e4acd-0c5b-4591-b5c3-af53f06da23c</guid><dc:creator>dmleone</dc:creator><description>&lt;p&gt;I did have it set to log level 3. After setting it to log level 4 i can now see debug info in the RTT Viewer. However, after i start the DFU i cant seem to use RTT Viewer to see or log any information after that. Is there another setting somewhere to enable DFU debug data logging?&lt;/p&gt;
&lt;p&gt;Also i was able to get it to upload the dfu .zip file. After it uploads it says application sent successfully, but the system does nothing. The only thing i changed in the application is instead of flashing LED 2 times when i push a button it flashes 4 times.&lt;/p&gt;
&lt;p&gt;Do I need BLE_DFU_ENABLED set to &amp;#39;1&amp;#39;? I had it set to &amp;#39;0&amp;#39; but changed it to &amp;#39;1&amp;#39; and it does not help.&lt;/p&gt;
&lt;p&gt;It appears it locks up after accepting the new firmware.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU not working</title><link>https://devzone.nordicsemi.com/thread/183317?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2019 07:07:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6303207-40c3-4879-b838-8ffb0f676119</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Can you verify that the the&amp;nbsp;NRF_LOG_DEFAULT_LEVEL in sdk_config.h is set to 4 (i.e.&amp;nbsp;Debug).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU not working</title><link>https://devzone.nordicsemi.com/thread/181702?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 16:20:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da0a6efc-9d21-4eaf-ac33-8a7394bac252</guid><dc:creator>dmleone</dc:creator><description>&lt;p&gt;I cannot figure ou thow to view the NRF_LOG_DEBUG output. I can view the NRF_LOG_INFO outputs, but how can i view the debug output. I am using SEGGER RTT Viewer to see th einfo an dtried starting debug logger but nothing is being recorded apart from NRF_LOG_INFO&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU not working</title><link>https://devzone.nordicsemi.com/thread/181627?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 13:20:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da8ea244-68bd-43c3-86cd-ff1883626130</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Ok, then please&amp;nbsp;flash the debug bootloader (&amp;nbsp;nRF5_SDK_15.2.0_9412b96\examples\dfu\secure_bootloader\pca10040_ble_debug) and then post the debug log from when you perform a DFU.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU not working</title><link>https://devzone.nordicsemi.com/thread/181609?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 12:48:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb6fa2f7-b771-417f-95c1-d05660347c07</guid><dc:creator>dmleone</dc:creator><description>&lt;p&gt;I saw that and corrected it still did not work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU not working</title><link>https://devzone.nordicsemi.com/thread/181598?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 12:35:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7337a1a-4f57-41f6-ac0c-40777e857ef7</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/dmleone"&gt;dmleone&lt;/a&gt;:You are using the incorrect&amp;nbsp; --sd-req, you are setting it to 0xAE(S140 v6.1.0), but you should use&amp;nbsp;&lt;span&gt;0xAF(s132_nrf52_6.1.0)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU not working</title><link>https://devzone.nordicsemi.com/thread/180566?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 18:46:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a01603c-0a6e-4205-aefa-d19ff1ef948d</guid><dc:creator>dmleone</dc:creator><description>&lt;p&gt;I got it to enter DFU mode. I modify the function to this&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void enter_dfu_mode(void)
{
    uint32_t err_code;

    // Dsiconnect all BLE connections
    disconnect_all();                       //static function
    
    // Set DFU mode bit
    //NRF_POWER-&amp;gt;GPREGRET = 0xB1;             // Non softdevice way
    err_code = sd_power_gpregret_set(GPREGRET_ID1, 0xB1);
    APP_ERROR_CHECK(err_code);

    //Disable SoftDevice. It is required to be able to write to GPREGRET2 register (SoftDevice API blocks it).
    //GPREGRET2 register holds the information about skipping CRC check on next boot. 
    err_code = nrf_sdh_disable_request();
    APP_ERROR_CHECK(err_code);

    NRF_LOG_DEBUG(&amp;quot;resetting into DFU...\n&amp;quot;);

    NVIC_SystemReset();
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Even though i enter DFU mode and connect. When i try and upload the compiled DFU .zip file created following this help site,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader"&gt;https://devzone.nordicsemi.com/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader&lt;/a&gt;, It disconnects immediately. What would cause it to disconnect immediately? Here is my batch file which makes the DFU .zip file&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;set APP_FILE=app
set APP_FILE_LOC=Output\Release\Exe
set SOFTDEVICE_LOC=sdk_nRF1520\components\softdevice\s132\hex
set SOFTDEVICE=s132_nrf52_6.1.0_softdevice.hex
set BOOTLOADER_LOC=secure_bootloader\pca10040_ble\ses\Output\Release\Exe
set BOOTLOADER=secure_bootloader_ble_s132_pca10040.hex
set OUTPUT_FILE_LOC=Output\Release
@echo Preparing: nordic dfu settings file...
nrfutil settings generate --family NRF52 --application %APP_FILE_LOC%\%APP_FILE%.hex --application-version 1 --bootloader-version 2 --bl-settings-version 1 %APP_FILE_LOC%\%APP_FILE%_bl_settings.hex
mergehex --merge %APP_FILE_LOC%\%APP_FILE%.hex %APP_FILE_LOC%\%APP_FILE%_bl_settings.hex --output  %APP_FILE_LOC%\%APP_FILE%_app+bl_settings.hex
@echo Preparing: nordic DFU zip
nrfutil pkg generate --hw-version 52 --sd-req 0xAE --application-version 1 --application %APP_FILE_LOC%\%APP_FILE%.hex --key-file %APP_FILE_LOC%\..\..\..\keys\app_private_key.pem %OUTPUT_FILE_LOC%\%APP_FILE%_app_dfu_pkg.zip
@echo merging softdevice, secure bootloader, bootloader settings and application...
mergehex --merge %SOFTDEVICE_LOC%\%SOFTDEVICE% %BOOTLOADER_LOC%\%BOOTLOADER% %APP_FILE_LOC%\%APP_FILE%_app+bl_settings.hex --output  %OUTPUT_FILE_LOC%\%APP_FILE%_sd_app_bl.hex&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>