<?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 wouldn&amp;#39;t reset automatically after DFU update</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60985/nrf52840-wouldn-t-reset-automatically-after-dfu-update</link><description>Hello, 
 I&amp;#39;m using nRF52840 custom board with nRF5 SDK v16.0 and Softdevice v7.0.1. 
 I can successfully DFU/OTA the device using nRFConnect app. But after DFU is complete, the device remains in DFU mode and device name keeps displayed as DfuTarg. Ideally</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 May 2020 12:19:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60985/nrf52840-wouldn-t-reset-automatically-after-dfu-update" /><item><title>RE: nRF52840 wouldn't reset automatically after DFU update</title><link>https://devzone.nordicsemi.com/thread/249951?ContentTypeID=1</link><pubDate>Thu, 14 May 2020 12:19:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7c97ed2-0cda-4073-8324-4dd1d6954a74</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It&amp;#39;s hard to say what the problem is without being able to debug it. Have you had any success with enabling logs, and have you tried to place breakpoints inside the nrf_bootloader.c-&amp;gt;dfu_enter_check() function?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 wouldn't reset automatically after DFU update</title><link>https://devzone.nordicsemi.com/thread/249757?ContentTypeID=1</link><pubDate>Wed, 13 May 2020 13:52:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f6fd0da-97d1-417b-ba5a-c3b661a38266</guid><dc:creator>Aftab</dc:creator><description>&lt;p&gt;Hello Vidar,&lt;/p&gt;
&lt;p&gt;I have tried this but it&amp;#39;s not working, the device does not reset by sending 0xC0 command. To demonstrate I have made a video, please have a look at that:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://drive.google.com/file/d/1g7Oumej_OCGd_ykoAXoaQ5MKZIUFSPWB/view?usp=sharing"&gt;drive.google.com/.../view&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 wouldn't reset automatically after DFU update</title><link>https://devzone.nordicsemi.com/thread/248404?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 10:44:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28adf217-4409-413f-a09e-0db347324b86</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Notifications need to be enable before you can send command requests.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-4b4986f14df4478f8b353dc2a89fca8a/pastedimage1588761875064v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Debug logging over RTT is enabled in the debug project &amp;#39;pca10056_s140_ble_debug&amp;#39;. The logs can be viewed with RTTViewer or RTTClient.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 wouldn't reset automatically after DFU update</title><link>https://devzone.nordicsemi.com/thread/248259?ContentTypeID=1</link><pubDate>Tue, 05 May 2020 15:03:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aac85b48-d9d1-43b3-83b8-dd28bd005472</guid><dc:creator>Aftab</dc:creator><description>&lt;p&gt;I have tried &lt;strong&gt;Abort&amp;nbsp;&lt;/strong&gt;to no success. The device remains in the DFU mode. See the attached picture.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/dfu_5F00_abort.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have also tried to debug the bootloader. For that I enabled the log by:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define NRF_LOG_ENABLED 1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But I get compile errors like:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Building ‘secure_bootloader_ble_s140_pca10056’ from solution ‘secure_bootloader_ble_s140_pca10056’ in configuration ‘Release’
  Compiling ‘nrf_log_str_formatter.c’
  Compiling ‘nrf_log_frontend.c’
  Compiling ‘app_error_weak.c’
  Compiling ‘app_scheduler.c’
  Compiling ‘crc32.c’
  Compiling ‘mem_manager.c’
  Compiling ‘nrf_atfifo.c’
  Compiling ‘nrf_atomic.c’
  Compiling ‘nrf_balloc.c’
  Compiling ‘nrf_fprintf.c’
  Compiling ‘nrf_fprintf_format.c’
  Compiling ‘nrf_fstorage.c’
  Compiling ‘nrf_fstorage_nvmc.c’
  Compiling ‘nrf_fstorage_sd.c’
  Compiling ‘nrf_memobj.c’
  Compiling ‘nrf_queue.c’
  Compiling ‘nrf_ringbuf.c’
  Compiling ‘nrf_strerror.c’
  Compiling ‘nrf_section_iter.c’
  Compiling ‘cc310_bl_backend_ecc.c’
  Compiling ‘cc310_bl_backend_ecdsa.c’
  Compiling ‘cc310_bl_backend_hash.c’
  Compiling ‘cc310_bl_backend_init.c’
  Compiling ‘cc310_bl_backend_shared.c’
  Compiling ‘boards.c’
  Compiling ‘nrf_sdh.c’
  Compiling ‘nrf_sdh_ble.c’
  Compiling ‘nrf_sdh_soc.c’
  Compiling ‘nrf_nvmc.c’
  Compiling ‘nrfx_atomic.c’
  Compiling ‘nrf_crypto_ecc.c’
  Compiling ‘nrf_crypto_ecdsa.c’
  Compiling ‘nrf_crypto_hash.c’
  Compiling ‘nrf_crypto_init.c’
  Compiling ‘nrf_crypto_shared.c’
  Compiling ‘main.c’
  Compiling ‘nrf_dfu_svci.c’
  Compiling ‘nrf_dfu_svci_handler.c’
  Compiling ‘nrf_bootloader.c’
  Compiling ‘nrf_bootloader_app_start.c’
  Compiling ‘nrf_bootloader_app_start_final.c’
  Compiling ‘nrf_bootloader_dfu_timers.c’
  Compiling ‘nrf_bootloader_fw_activation.c’
  Compiling ‘nrf_bootloader_info.c’
  Compiling ‘nrf_bootloader_wdt.c’
  Compiling ‘nrf_dfu.c’
  Compiling ‘nrf_dfu_ble.c’
  Compiling ‘nrf_dfu_flash.c’
  Compiling ‘nrf_dfu_mbr.c’
  Compiling ‘nrf_dfu_handling_error.c’
  Compiling ‘nrf_dfu_req_handler.c’
  Compiling ‘nrf_dfu_settings.c’
  Compiling ‘nrf_dfu_settings_svci.c’
  Compiling ‘nrf_dfu_transport.c’
  Compiling ‘nrf_dfu_utils.c’
  Compiling ‘nrf_dfu_validation.c’
  Compiling ‘nrf_dfu_ver_validation.c’
  Compiling ‘oberon_backend_chacha_poly_aead.c’
  Compiling ‘oberon_backend_ecc.c’
  Compiling ‘oberon_backend_ecdh.c’
  Compiling ‘oberon_backend_ecdsa.c’
  Compiling ‘oberon_backend_eddsa.c’
  Compiling ‘oberon_backend_hash.c’
  Compiling ‘oberon_backend_hmac.c’
  Linking secure_bootloader_ble_s140_pca10056.elf
    .text is too large to fit in FLASH memory segment
    .crypto_data is too large to fit in FLASH memory segment
    .dfu_trans is too large to fit in FLASH memory segment
    .svc_data is too large to fit in FLASH memory segment
    .log_const_data is too large to fit in FLASH memory segment
    .nrf_balloc is too large to fit in FLASH memory segment
    .sdh_ble_observers is too large to fit in FLASH memory segment
    .sdh_state_observers is too large to fit in FLASH memory segment
    .sdh_stack_observers is too large to fit in FLASH memory segment
    .sdh_req_observers is too large to fit in FLASH memory segment
    .sdh_soc_observers is too large to fit in FLASH memory segment
    .fs_data is too large to fit in FLASH memory segment
    .rodata is too large to fit in FLASH memory segment
    .data is too large to fit in FLASH memory segment
    Output/secure_bootloader_ble_s140_pca10056 Release/Obj/main.o: in function `main&amp;#39;:
    undefined reference to `nrf_log_default_backends_init&amp;#39;
Build failed&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It seems like I have to change the memory areas for bootloader but I&amp;#39;m not sure which areas and what changes to make. This project uses softdevice as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 wouldn't reset automatically after DFU update</title><link>https://devzone.nordicsemi.com/thread/248092?ContentTypeID=1</link><pubDate>Tue, 05 May 2020 08:36:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8445b46f-b4f6-478b-9ea6-3b2d28ccaf5f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Yes, you can send the&amp;nbsp;&lt;a title="Abort" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_dfu_transport.html?cp=7_1_3_5_2_0_11#lib_dfu_transport_op_abort"&gt;Abort&lt;/a&gt;&amp;nbsp;request to trigger a reset (ie write 0xC to control point)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 wouldn't reset automatically after DFU update</title><link>https://devzone.nordicsemi.com/thread/248067?ContentTypeID=1</link><pubDate>Tue, 05 May 2020 07:33:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b2c6cfc-6db4-4af6-b3e6-3986faef90d5</guid><dc:creator>Aftab</dc:creator><description>&lt;p&gt;Thank you Vidar for the reply.&lt;/p&gt;
&lt;p&gt;Is there any way to exist the DFU mode by accessing GATT characteristics of DfuTarg? There &amp;quot;Secure DFU Packet&amp;quot; and &amp;quot;Secure DFU Control Point&amp;quot;. May be we send some packet with reset command?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 wouldn't reset automatically after DFU update</title><link>https://devzone.nordicsemi.com/thread/247904?ContentTypeID=1</link><pubDate>Mon, 04 May 2020 13:39:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78523374-aecb-48c5-ab0a-9f68476394cb</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;It sounds like the bootloader falls back to DFU mode after the update. Are you able to debug the bootloader when this happens? If so, please try to debug the&amp;nbsp;nrf_bootloader.c-&amp;gt;dfu_enter_check() function to see if any of these checks&amp;nbsp;return true.&amp;nbsp;RESETREAS and GPREGRET are both cleared through power on reset so maybe the explanation is that one of these registers are not properly cleared after the update was completed.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>