<?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>What conditions cause OP_CODE_SYS_RESET to get sent during DFU?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5306/what-conditions-cause-op_code_sys_reset-to-get-sent-during-dfu</link><description>Hi,
I&amp;#39;m testing doing a soft device update (v7.0 to v7.1) over DFU, but I consistently get OP_CODE_SYS_RESET sent to my device after 4 packets(80 bytes), at which point the update fails. I&amp;#39;m using an Android device using nRF Toolbox v1.4 to perform the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Jan 2015 17:01:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5306/what-conditions-cause-op_code_sys_reset-to-get-sent-during-dfu" /><item><title>RE: What conditions cause OP_CODE_SYS_RESET to get sent during DFU?</title><link>https://devzone.nordicsemi.com/thread/18562?ContentTypeID=1</link><pubDate>Fri, 30 Jan 2015 17:01:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cce2e90-67e0-4fe7-9abf-c39d18c51bc3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Akbar,&lt;/p&gt;
&lt;p&gt;I believe that our code (SDK v6.1) does wait for the raw clear command to complete with state =  DFU_STATE_PREPARING until we receive the callback pstorage_callback_handler() with PSTORAGE_CLEAR_OP_CODE. After that we will send the notification back to the DFU master (using                     m_data_pkt_cb(START_PACKET, result, p_data), please see pstorage_callback_handler() .&lt;/p&gt;
&lt;p&gt;The DFU peer master should wait for this notification before proceed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What conditions cause OP_CODE_SYS_RESET to get sent during DFU?</title><link>https://devzone.nordicsemi.com/thread/18561?ContentTypeID=1</link><pubDate>Fri, 30 Jan 2015 13:03:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e8df369-3a00-422c-bd13-30d6e74b01b2</guid><dc:creator>Akbar Dhanaliwala</dc:creator><description>&lt;p&gt;Hi Hung,
I believe I&amp;#39;ve solved the issue. It has to do with timing between when &amp;quot;pstorage_raw_clear&amp;quot; is called during &amp;quot;dfu_sd_prepare&amp;quot; and when the first data packets start to arrive. Basically, firmware image data packets are arriving before &amp;quot;pstorage_raw_clear&amp;quot; has a chance to finish. This causes a backup in the hci memory pool module, because there is no place for these incoming packets to go(can&amp;#39;t write to flash while it&amp;#39;s being cleared). Ultimately the hci memory pool runs out of space and I get the NRF_ERROR_NO_MEM message which is causing DFU to fail.&lt;/p&gt;
&lt;p&gt;I was able to solve this issue by waiting until &amp;quot;pstorage_raw_clear&amp;quot; finishes before calling &amp;quot;ble_dfu_response_send&amp;quot; which notifies the Controller that the Start Packet (OpCode 1) has been properly handled and that the Controller can move on to the Init Packet (OpCode 2) or Firmware Image Packets (OpCode 3).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What conditions cause OP_CODE_SYS_RESET to get sent during DFU?</title><link>https://devzone.nordicsemi.com/thread/18559?ContentTypeID=1</link><pubDate>Thu, 29 Jan 2015 16:04:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1e282ec-b820-4dc4-bf61-ffafec9bd5e0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Akbar,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have issue updating softdevice with nRFToolbox App (v1.11.4) and the DFU bootloader in SDK v6.1
If you have issue of NRF_ERROR_NO_MEM , could you please check and make sure the hci_mem_pool_internal.h is referred correctly, that RX_BUF_QUEUE_SIZE = 8, TX_BUF_SIZE = 4 and RX_BUF_SIZE = 32. Before we had an issue that the wrong file (the one for UART DFU) is referred instead that resulted in NRF_ERROR_NO_MEM error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What conditions cause OP_CODE_SYS_RESET to get sent during DFU?</title><link>https://devzone.nordicsemi.com/thread/18558?ContentTypeID=1</link><pubDate>Thu, 29 Jan 2015 15:55:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46d39ff8-6cb9-4797-b48d-a28520937e4c</guid><dc:creator>Akbar Dhanaliwala</dc:creator><description>&lt;p&gt;Hi Hung,
I mis-typed, I actually am using 6.1. Apologies.
best,
akbar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What conditions cause OP_CODE_SYS_RESET to get sent during DFU?</title><link>https://devzone.nordicsemi.com/thread/18557?ContentTypeID=1</link><pubDate>Thu, 29 Jan 2015 15:46:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c087d76-ed48-4e9d-b33f-ff7444e179ad</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Akbar,&lt;/p&gt;
&lt;p&gt;I assume that you are using the experimental bootloader included in the SDK v6.0.
The official version in SDK v6.0 doesn&amp;#39;t support Softdevice update.
I would not suggest to use the experimental version on V6.0 but to switch to the offical bootloader version in SDK v6.1.&lt;/p&gt;
&lt;p&gt;Please try with SDK v6.1 and let me know the result.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What conditions cause OP_CODE_SYS_RESET to get sent during DFU?</title><link>https://devzone.nordicsemi.com/thread/18560?ContentTypeID=1</link><pubDate>Thu, 29 Jan 2015 14:41:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:162bd52b-bef4-4f59-8a7f-d3f647e6c5bc</guid><dc:creator>Akbar Dhanaliwala</dc:creator><description>&lt;p&gt;Hi Hung,
I&amp;#39;m using an older sdk (SDK 6.0). I figured out why the error was happening (and have a work around but not sure if it&amp;#39;s a reliable workaround) but I don&amp;#39;t understand the base cause of it. Basically i was getting a NRF_ERROR_NO_MEM error from the &amp;quot;hci_mem_pool_rx_produce&amp;quot; function call found in &amp;quot;app_data_process/dfu_transport_ble.c&amp;quot;. The reason this was happening is because the &amp;quot;pstorage_callback_handler/dfu_dual_bank.c&amp;quot; was never being called and so hci memory was not being released. What&amp;#39;s interesting is that this scenario only occurred when updating the softdevice, when I attempted to update an application, everything functioned normally. My workaround was to comment out &amp;quot;dfu_sd_prepare&amp;quot; in &amp;quot;dfu_start_pkt_handle&amp;quot; as this was one of the main differences between updating a softdevice and an application. Once I commented that out I was able to update the softdevice on my device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What conditions cause OP_CODE_SYS_RESET to get sent during DFU?</title><link>https://devzone.nordicsemi.com/thread/18556?ContentTypeID=1</link><pubDate>Wed, 28 Jan 2015 12:20:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8d31aaa-51bc-4761-a34c-50a528a64be5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Akbar,&lt;/p&gt;
&lt;p&gt;Could you let me know which bootloader you are using (SDK version) ?
Could you capture &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF-Sniffer/(language)/eng-GB"&gt;a sniffer trace&lt;/a&gt; of your DFU process ?&lt;/p&gt;
&lt;p&gt;Android app will send that reset command (0x06) if the DFU is not in correct state. I would need to have a look at the trace to know what would be wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>