<?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>Trouble debugging custom PCB with DFU service on</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55876/trouble-debugging-custom-pcb-with-dfu-service-on</link><description>Hi! 
 My software setup consists of SDK 15.0.0 and SD 6.0.0. 
 
 I am using nRF52DK for flashing and debugging my custom PCB board on nRF52832. 
 I am developing an application with buttonless DFU service so there also must be bootloader on the bottom</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 03 Jan 2020 12:33:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55876/trouble-debugging-custom-pcb-with-dfu-service-on" /><item><title>RE: Trouble debugging custom PCB with DFU service on</title><link>https://devzone.nordicsemi.com/thread/227405?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2020 12:33:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cf3257b-6c99-497d-a3c1-3c70b83605f9</guid><dc:creator>Pawel Niedbala</dc:creator><description>&lt;p&gt;Thank you, it worked.&lt;/p&gt;
&lt;p&gt;Strange thing that custom board debugging with DFU worked only when&amp;nbsp;&lt;span&gt;NRF_BL_DFU_ENTER_METHOD_BUTTON=0 but devboard worked even with&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_BUTTON=1&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble debugging custom PCB with DFU service on</title><link>https://devzone.nordicsemi.com/thread/227062?ContentTypeID=1</link><pubDate>Mon, 30 Dec 2019 12:20:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3de891f8-789e-47ac-ac5a-76493f7662ec</guid><dc:creator>Vidar Berg</dc:creator><description>[quote user="Pawel Niedbala"]I am not using button_enter_method but buttonless so I did not bother configuring pinout for my board in bootloader project.[/quote]
&lt;p&gt;&amp;nbsp;Did you make sure to disable the NRF_BL_DFU_ENTER_METHOD_BUTTON option in sdk_config? It&amp;#39;s enabled by default so it could explain why your board gets stuck in DFU mode. &lt;/p&gt;
&lt;p&gt;You may also place the breakpoint in nrf_bootloader.c::dfu_enter_check() to verify if there is a failing check that makes it to stay in DFU mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble debugging custom PCB with DFU service on</title><link>https://devzone.nordicsemi.com/thread/227057?ContentTypeID=1</link><pubDate>Mon, 30 Dec 2019 11:17:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18401870-5fa5-4808-8908-37f7ea52751e</guid><dc:creator>Pawel Niedbala</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for your answer.&lt;/p&gt;
&lt;p&gt;I can confirm that I use the external 32kHz in my design&lt;br /&gt;(this one to be absolutely sure&amp;nbsp;&lt;img height="129" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1577703654317v1.png" width="208" alt=" " /&gt;?)&lt;/p&gt;
&lt;p&gt;So the settings are identical in app project and bootloader project:&lt;/p&gt;
&lt;p&gt;#define NRF_SDH_CLOCK_LF_SRC 1&lt;br /&gt;#define NRF_SDH_CLOCK_LF_RC_CTIV 0&lt;br /&gt;#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 0&lt;br /&gt;#define NRF_SDH_CLOCK_LF_ACCURACY 7&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then I tried to run only bootloader project on my boards. The approach was to erase chip with SD flashing and then press F5 (debug run in SES) in secure_bootloader project. Both nRF52DK and my custom board behave the same, debugger reaches line 142 in main() and loops. I believe it works as expected, at least it runs:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1577704006147v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In bootloader project I commented out all the&amp;nbsp;&lt;em&gt;bsp_board_xx(...)&lt;/em&gt; function calls from main.c. I am not using button_enter_method but buttonless so I did not bother configuring pinout for my board in bootloader project. Do you think there can hardcoded GPIO call or something like that disallowing me to debug app with DFU functionality?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble debugging custom PCB with DFU service on</title><link>https://devzone.nordicsemi.com/thread/226739?ContentTypeID=1</link><pubDate>Mon, 23 Dec 2019 14:14:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:764ae1e8-aedd-42ed-bb44-e16edfbd4c29</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Do you have the optional 32KHz crystal mounted on your custom board, and if not, have you remembered to change the LF clock source in your bootloader project? It would also be interesting to know if the bootloader works without the application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;sdk_config.h settings to select RCOSC as clock source:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;/h&amp;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 16
#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></channel></rss>