<?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>Problems with DFU on nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79735/problems-with-dfu-on-nrf52832</link><description>Hello, 
 I am trying to add DFU to an existing product that uses an nRF52832. I have gone through the tutorial here . I am using SDK v15.3.0. I am using the GNU Tools ARM Embedded 6 2017-q1-update toolchain. My process is to first erase the chip then</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Sep 2021 14:20:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79735/problems-with-dfu-on-nrf52832" /><item><title>RE: Problems with DFU on nRF52832</title><link>https://devzone.nordicsemi.com/thread/330084?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 14:20:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59d1681e-13fe-4690-84cf-0c260c52d6a6</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for the update! But I&amp;#39;m suprised the pre-built hex worked on your custom board as it should be built with the same default clock configuration. In any case, for boards that don&amp;#39;t have a LF crystal mounted it&amp;#39;s generally recommeded to select the internal RC oscillator (NRF_CLOCK_LF_SRC_RC). The Synthezided clock is pretty power hungry since it&amp;#39;s derived from the 64 MHz crystal oscillator ( idle current won&amp;#39;t get below ~500 uA).&lt;/p&gt;
&lt;p&gt;You can use the following configuration to select the RC oscillator:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
// &amp;lt;h&amp;gt; Clock - SoftDevice clock configuration

//==========================================================
// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.

// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_SRC_RC
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_SRC_XTAL
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_SRC_SYNTH

#ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval.
#ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 8
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature.
// &amp;lt;i&amp;gt; How often (in number of calibration intervals) the RC oscillator shall be calibrated
// &amp;lt;i&amp;gt;  if the temperature has not changed.

#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.

// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_ACCURACY_250_PPM
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_ACCURACY_500_PPM
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_ACCURACY_150_PPM
// &amp;lt;3=&amp;gt; NRF_CLOCK_LF_ACCURACY_100_PPM
// &amp;lt;4=&amp;gt; NRF_CLOCK_LF_ACCURACY_75_PPM
// &amp;lt;5=&amp;gt; NRF_CLOCK_LF_ACCURACY_50_PPM
// &amp;lt;6=&amp;gt; NRF_CLOCK_LF_ACCURACY_30_PPM
// &amp;lt;7=&amp;gt; NRF_CLOCK_LF_ACCURACY_20_PPM
// &amp;lt;8=&amp;gt; NRF_CLOCK_LF_ACCURACY_10_PPM
// &amp;lt;9=&amp;gt; NRF_CLOCK_LF_ACCURACY_5_PPM
// &amp;lt;10=&amp;gt; NRF_CLOCK_LF_ACCURACY_2_PPM
// &amp;lt;11=&amp;gt; NRF_CLOCK_LF_ACCURACY_1_PPM

#ifndef NRF_SDH_CLOCK_LF_ACCURACY
#define NRF_SDH_CLOCK_LF_ACCURACY 1
#endif
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with DFU on nRF52832</title><link>https://devzone.nordicsemi.com/thread/330079?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 14:04:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7953801-9e6b-466f-a337-8b23598134b5</guid><dc:creator>scottl</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Changing the clock source fixed the problem&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f926.svg" title="Face palm"&gt;&amp;#x1f926;&lt;/span&gt;&amp;nbsp;Thanks for the help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with DFU on nRF52832</title><link>https://devzone.nordicsemi.com/thread/330059?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 13:18:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3b34863-15ba-4a29-bc30-fd0ccd132e6d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Scott,&lt;/p&gt;
&lt;p&gt;Did you hit a breakpoint prior to receiving the fault by any chance? The fault shown in your log is an assertion raised by Softdevice that indicates that it has been unable to process a BLE event in time, and the most common reason for this type of assert is when you let the debugger halt the CPU and then let it resume execution afterwards.&lt;/p&gt;
[quote userid="108273" url="~/f/nordic-q-a/79735/problems-with-dfu-on-nrf52832"]I have also run the debugger and noticed it gets to the &amp;quot;loop_forever()&amp;quot; function then at some point it fails in the softdevice.[/quote]
&lt;p&gt;Does it loop around address 0x155ce in the Softdevice? This is the location of the &amp;quot;wait for event&amp;quot; loop inside the Softdevice where typically ~99% of the time. In other words, there&amp;#39;s a good chance you will end up there if you randomly pause the debugger.&lt;/p&gt;
&lt;p&gt;The wait for event loop is entered by calling &lt;span class="item"&gt;&lt;a title="sd_app_evt_wait" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.1/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html?cp=4_7_3_4_2_7_2_0#ga11d88d38ac99fb72cde74c9385d36433"&gt;sd_app_evt_wait&lt;/a&gt;&lt;/span&gt;().&lt;/p&gt;
[quote userid="108273" url="~/f/nordic-q-a/79735/problems-with-dfu-on-nrf52832"]I can flash one of the precompiled bootloaders such as: &amp;quot;bootloader_secure_ble_debug_without_bonds_s132.hex&amp;quot; and it will advertise ok and not enter a fault. I have also tried flashing the bootloader I compiled onto a nRF52840-DK and it advertises normally without throwing a fault. I have tried compiling both the&amp;nbsp;pca10040_ble_debug and the pca10040_ble version, but the result is the same. [/quote]
&lt;p&gt;This is harder to explain.. I can&amp;#39;t think of an explanation for how your FW would run fine on a DK but not on your custom board. Could you try to change the clock source (NRF_SDH_CLOCK_LF_SRC setting in sdk_config.h) to NRF_CLOCK_LF_SRC_SYNTH to see if it could have anything to do with the 32 Khz crystal mounted on your board?&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>