<?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>nRF52 Bootloader acting differently on different boards</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21779/nrf52-bootloader-acting-differently-on-different-boards</link><description>Hi All, 
 I have developed an application on the RedBear BLE Nano2, and am trying to port it accross to a custom nRF52 board. 
 The Hex that the Arduino IDE outputs does not contain the soft device, so I have run MergeHex to combine the SoftDevice/Bootloader</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 May 2017 14:28:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21779/nrf52-bootloader-acting-differently-on-different-boards" /><item><title>RE: nRF52 Bootloader acting differently on different boards</title><link>https://devzone.nordicsemi.com/thread/85546?ContentTypeID=1</link><pubDate>Thu, 04 May 2017 14:28:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:408d466d-f4c1-4aba-bb7e-7f8a32123d93</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Yes, you have to make sure that the application and bootloader hex files does not overlap, otherwise you will get an error when you try to merge them.&lt;/p&gt;
&lt;p&gt;The bootloader will look for the BANK_VALID_APP flag on the bootloader settings flash page and start the application if it is set to true, i.e. 0x01. The flag is by default is set to false. Thus, when you flash the BL, APP and SD, the flag will still be set to false and the the bootloader will remain in bootloader mode until you perform a application DFU, which upon completion will set the flag to true.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Bootloader acting differently on different boards</title><link>https://devzone.nordicsemi.com/thread/85545?ContentTypeID=1</link><pubDate>Thu, 04 May 2017 14:27:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1c5a5db-245a-4366-8dec-631e4371f921</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;I am afraid that I do not know how to use RedBearLabs Arduino Library to set the LFCLKSRC to the internal RC oscillator. In our bootloader example from SDK v11.0.0 you change it by  modify the NRF_CLOCK_LFCLKSRC in the pca10040.h or custom_board.h to the following&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_RC,            \  
                                     .rc_ctiv       = 16,                             \   
                                     .rc_temp_ctiv  = 2,                              \
                                     .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_250_P
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Bootloader acting differently on different boards</title><link>https://devzone.nordicsemi.com/thread/85544?ContentTypeID=1</link><pubDate>Thu, 04 May 2017 14:01:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f60b990-be6a-48db-920a-02e733d7c34d</guid><dc:creator>Steve</dc:creator><description>&lt;p&gt;Thanks Bjorn,&lt;/p&gt;
&lt;p&gt;The custom board does not have a 32KHz crystal. Is it possible for me to use the Arduino IDE that is used with the BLE Nano in order to set the board to use the internal RC?&lt;/p&gt;
&lt;p&gt;I guess it needs to be set in the bootloader, or can I set this in my application?&lt;/p&gt;
&lt;p&gt;Regarding merging hex files, the only bootloader than I have been able to successfully merge with my application Hex that the Arduino IDE produces is the &amp;#39;SoftdeviceS132_2.0_SDK11_Bootloader_20161221.hex&amp;#39; As I believe the address locations that are set in the Hex files need to match up.&lt;/p&gt;
&lt;p&gt;I also don&amp;#39;t fully understand why on the nRF52DK the bootloader gets stuck in OTA advertising mode, and does not run the application. Is there a trigger that causes this?&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Bootloader acting differently on different boards</title><link>https://devzone.nordicsemi.com/thread/85543?ContentTypeID=1</link><pubDate>Thu, 04 May 2017 11:31:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab636672-4eeb-439d-b619-96ec5130feaf</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Steve,&lt;/p&gt;
&lt;p&gt;Does your custom board have an external 32kHz crystal on it? If not, then you will have to set the Low Frequency Clock Source to use the internal RC oscillator. It looks like the BLE Nano2 has it and I know that the nRF52 DK has it, so that might be the reason why your code is not running on the custom board.&lt;/p&gt;
&lt;p&gt;If you want to flash a combined SoftDevice, Bootloader and Application hex file created with &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.tools/dita/tools/nrf5x_command_line_tools/nrf5x_mergehex.html?resultof=%22%6d%65%72%67%65%68%65%78%22%20"&gt;mergehex&lt;/a&gt;, where the device jumps to the application without having to perform a OTA update, you have to set the &lt;code&gt;BANK_VALID_APP&lt;/code&gt; flag in &lt;code&gt;bootloader_settings.c&lt;/code&gt;, i.e. change the line&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint8_t  m_boot_settings[CODE_PAGE_SIZE]    __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS))) __attribute__((used));   
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to the following&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint8_t  m_boot_settings[CODE_PAGE_SIZE]    __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS))) __attribute__((used)) = {BANK_VALID_APP};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Alternatively you can merge the bootloader hex with &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/app_5F00_valid_5F00_setting_5F00_nrf52.hex"&gt;this&lt;/a&gt; hex file to set the BANK_VALID_APP flag.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>