<?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>nrf52810 Not jumping Bootloader from BLE Application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118693/nrf52810-not-jumping-bootloader-from-ble-application</link><description>Hi, 
 Chip : NRF52810 
 Soft Device : s132_nrf52_5.1.0 
 
 SDK : nrf5_sdk_for_thread_and_zigbee_v4.2.0_af27f76 (BLE BootLoader) 
 IDE : Segger Embedded Studio 
 
 SDK : nRF5_SDK_14.2.0_17b948a (BLE Application) 
 IDE : IAR Embedded Workbench 
 
 
 in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Feb 2025 14:44:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118693/nrf52810-not-jumping-bootloader-from-ble-application" /><item><title>RE: nrf52810 Not jumping Bootloader from BLE Application</title><link>https://devzone.nordicsemi.com/thread/524390?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2025 14:44:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc35532a-7572-4547-84e7-81b1cd84a7de</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I would begin with starting a debug session with the Bootloader project and verify that main() is reached after the enter DFU command has been issued to the application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 Not jumping Bootloader from BLE Application</title><link>https://devzone.nordicsemi.com/thread/524384?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2025 14:37:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07fe1a60-1a1e-47bd-b26c-ccc9375cdffe</guid><dc:creator>NikhilVV</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have removed all nvmc writes from bootloader and tried to enter DFU mode in run mode.&lt;/p&gt;
&lt;p&gt;But the bootloader not entering to DFU, GPREGRET Register is setting from ble App and ble app getting rebooted .. But after rebooting it fails to enter DFU mode and jumps to Application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After rebooting i rechecked the GPREGRET data and it says,&lt;/p&gt;
&lt;p&gt;C:\Users\DELL&amp;gt;nrfjprog --memrd 0x4000051c&amp;nbsp; &amp;nbsp; &amp;nbsp; //before&amp;nbsp;&lt;br /&gt;0x4000051C: 00000000 |....|&lt;/p&gt;
&lt;p&gt;C:\Users\DELL&amp;gt;nrfjprog --memrd 0x4000051c&amp;nbsp; &amp;nbsp; &amp;nbsp;//after reboot&lt;br /&gt;0x4000051C: 000000B1&lt;/p&gt;
&lt;p&gt;It is not clearing the data.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 Not jumping Bootloader from BLE Application</title><link>https://devzone.nordicsemi.com/thread/523627?ContentTypeID=1</link><pubDate>Wed, 19 Feb 2025 06:29:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae71ec6a-c9a3-4649-b398-1397f68f3e8a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Please remove your nvmc writes and&amp;nbsp; try debug the bootloader to&amp;nbsp;find out why the DFU flag in the GPREGRET register is being cleared without the device entering DFU mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 Not jumping Bootloader from BLE Application</title><link>https://devzone.nordicsemi.com/thread/523624?ContentTypeID=1</link><pubDate>Wed, 19 Feb 2025 06:06:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f8f2859-26f7-4014-80db-0eacaa287833</guid><dc:creator>NikhilVV</dc:creator><description>&lt;p&gt;Q But did you test them individually with the same Softdevice version?&lt;/p&gt;
&lt;p&gt;Yes. Application and bootloader checked with same Softdevice&amp;nbsp; (&lt;span&gt;s132_nrf52_5.1.0) and working well.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;i hope by it will work together with BLE APP and Bootloader.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Am not debugging bootloader. i am verifying that whether it hit or enter into bootloader or not by writting memory using nvmc_write.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If it is not a problem with read function why did the read function is not reading the correct data from&amp;nbsp; memory location. I read the same memory using nrfjprog --memrd&amp;nbsp; and returning&amp;nbsp;&lt;span&gt;12341234.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="quote-header"&gt;&lt;/div&gt;
&lt;blockquote class="quote"&gt;&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 Not jumping Bootloader from BLE Application</title><link>https://devzone.nordicsemi.com/thread/523393?ContentTypeID=1</link><pubDate>Tue, 18 Feb 2025 06:58:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ad404b4-5b55-4752-b2c1-ef2d0dbb9b69</guid><dc:creator>Vidar Berg</dc:creator><description>[quote user="NikhilVV"]But i individually checked the application and bootloader which was working fine so i thought to merge the both.[/quote]
&lt;p&gt;But did you test them individually with the same Softdevice version?&lt;/p&gt;
[quote user="NikhilVV"]By writing memory from bootloader i confirmed that device is rebooting and control goes to bootloader but it fails to enter dfu mode or dfu_enter getting failed. so it start running APP.[/quote]
&lt;p&gt;To debug the bootloader, I recommend either using the *_debug variant or start a debug session in your bootloader project and place breakpoints in the dfu enter check function.&lt;/p&gt;
[quote user="NikhilVV"]&lt;p&gt;Q. Why memory read function getting failed from bootloader ?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;i have tried&amp;nbsp;2&amp;nbsp;methods to read memory as follows but all methods are got failed.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;It is not a problem with the read function.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 Not jumping Bootloader from BLE Application</title><link>https://devzone.nordicsemi.com/thread/523281?ContentTypeID=1</link><pubDate>Mon, 17 Feb 2025 13:29:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb5ed2b2-f4a9-482a-a190-712b96ffd313</guid><dc:creator>NikhilVV</dc:creator><description>&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;I was trying to verify that while booting whether the control goes to bootloader or not.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;By writing memory from bootloader i confirmed that device is rebooting and control goes to bootloader but it fails to enter dfu mode or dfu_enter getting failed. so it start running APP.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;i understand i have to make bootloader and Application have to make compatible with same softdevice version.&lt;/p&gt;
&lt;p&gt;But i individually checked the application and bootloader which was working fine so i thought to merge the both.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Q. Why memory read function getting failed from bootloader ?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;i have tried&amp;nbsp;2&amp;nbsp;methods to read memory as follows but all methods are got failed.&lt;/p&gt;
&lt;p&gt;can u tell why it is getting failed.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint32_t* dfu_flag_mem2 = (uint32_t*) 0x00022000;
DFU_Flag_data = (uint32_t)*dfu_flag_mem2 ;


memcpy(&amp;amp;dfu_flag_mem1,(uint32_t*) 0x00022000,sizeof(uint32_t));
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 Not jumping Bootloader from BLE Application</title><link>https://devzone.nordicsemi.com/thread/522982?ContentTypeID=1</link><pubDate>Fri, 14 Feb 2025 08:54:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28a1f859-068e-40b5-8240-a71063c0daa7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for confirming that the UICR registers were set.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The application and bootloader running on your device must always be compatible with the same softdevice. You can&amp;#39;t have the bootloader built for one major version and the application for another. So first the first step is to make sure both&amp;nbsp;are compatible with the&amp;nbsp;same softdevice version.&lt;/p&gt;
[quote user="NikhilVV"]i have checked by writing memory using nrf_nvmc_write_word() from bootloader it is writting the memory location while booting before jump to BLE Application.[/quote]
&lt;p&gt;I&amp;#39;m not sure I understand what you are trying to test with this or why you are writing to this address. If the bootloader changes any of the data in the application region (or the app writes to itself), then the&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/lib_secure_boot.html"&gt;boot validation&amp;nbsp;&lt;/a&gt;&amp;nbsp;of the app will fail.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 Not jumping Bootloader from BLE Application</title><link>https://devzone.nordicsemi.com/thread/522775?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2025 07:18:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f33ddd5b-425c-4351-aec7-e299b38344e3</guid><dc:creator>NikhilVV</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;gt;nrfjprog --memrd 0x10001014&lt;br /&gt;0x10001014: 00029000 |....|&lt;/p&gt;
&lt;p&gt;&amp;gt;nrfjprog --memrd 0x10001018&lt;br /&gt;0x10001018: 0002E000 |....|&lt;/p&gt;
&lt;p&gt;i have checked by writing memory using nrf_nvmc_write_word() from bootloader it is writting the memory location while booting before jump to BLE Application.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;quot;nrf_nvmc.h&amp;quot;

ret_code_t nrf_bootloader_init(nrf_dfu_observer_t observer)
{
    NRF_LOG_DEBUG(&amp;quot;In nrf_bootloader_init&amp;quot;);

   ....

    switch (activation_result)
    {
        case ACTIVATION_NONE:

            nrf_nvmc_write_word(0x00022100,0x12341234);
            initial_timeout = NRF_BOOTLOADER_MS_TO_TICKS(NRF_BL_DFU_INACTIVITY_TIMEOUT_MS);
            dfu_enter       = dfu_enter_check();
            
            ...
            break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also i read the memory while running application and received following result.&lt;/p&gt;
&lt;p&gt;&amp;gt;nrfjprog --memrd 0x00022100&lt;br /&gt;0x00022100: 12341234 |4.4.|&lt;/p&gt;
&lt;p&gt;and here is the result which i written from BLE Application&lt;/p&gt;
&lt;p&gt;&amp;gt;nrfjprog --memrd 0x00022000&lt;br /&gt;0x00022000: &lt;span&gt;12341234&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;from bootloader am reading the same memory and used to enter DFU mode which is getting fail or not reading proper value&amp;nbsp;similarly&amp;nbsp; with gpregister also.&lt;/p&gt;
&lt;p&gt;how to read nvmc proper ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BLE Application is developed in&amp;nbsp;&lt;span&gt;nRF5_SDK_14.2.0_17b948a which is developed long back ago and we do not want to disturb right now. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;where Bootloader&amp;nbsp;developing in&amp;nbsp;nrf5_sdk_for_thread_and_zigbee_v4.2.0_af27f76 currently where we want to add OTA in our coming BLE products.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;lately we will move both Application and Bootloader into one SDK.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 Not jumping Bootloader from BLE Application</title><link>https://devzone.nordicsemi.com/thread/522002?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 15:14:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4037964-ff4b-4b5a-be85-56e5301138d2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Please verify that the bootloader start address is correctly stored at address 0x10001014 when both bootloader and app is loaded to your device. If not, the bootloader will not be included in the boot sequence:&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/sds_s132/page/SDS/s1xx/mbr_bootloader/mbr_sd_reset_behavior.html"&gt;https://docs.nordicsemi.com/bundle/sds_s132/page/SDS/s1xx/mbr_bootloader/mbr_sd_reset_behavior.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also, nrf5_sdk_for_thread_and_zigbee_v4.2.0_af27f76 and&amp;nbsp;nRF5_SDK_14.2.0_17b948a are not compatible with the same Softdevices. Is there a particular reason for using this combination? Normally you would want to base the application and bootloader on the same SDK version. There&amp;nbsp;should also not be any reason to use the Thread &amp;amp; Zigbee SDK when targeting the nRF52810 which does not have a 15.4 RADIO needed for thread and zigbee.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 Not jumping Bootloader from BLE Application</title><link>https://devzone.nordicsemi.com/thread/521854?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 06:31:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df9c425e-ed43-4149-8303-cf4a6d106db7</guid><dc:creator>NikhilVV</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;yes i did.&lt;/p&gt;
&lt;p&gt;Here follow the&amp;nbsp; BLE application Jump Code..&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define BOOTLOADER_DFU_START  0xB1

void Uart_check_rx(void) {
 ...
 
  if(memcmp(command,(uint8_t *)&amp;quot;AT+SERIALDFU&amp;quot;,length)==0)
  {
     NRF_LOG_INFO(&amp;quot;Command Recived: AT+SERIALDFU?&amp;quot;);
     ble_dfu_buttonless_bootloader_start_finalize_local();
     NVIC_SystemReset();
  }
  ..
 }


uint32_t ble_dfu_buttonless_bootloader_start_finalize_local(void)
{
    uint32_t err_code;
    NRF_LOG_INFO(&amp;quot;Going to Bootloader Start&amp;quot;);

    err_code = sd_power_gpregret_clr(1,0xffffffff);   //
    err_code = sd_power_gpregret_clr(0,0xffffffff);
    
    NRF_LOG_INFO(&amp;quot;err code %d&amp;quot;,err_code);
    VERIFY_SUCCESS(err_code);
    NRF_LOG_INFO(&amp;quot;Register clear Success&amp;quot;);

	err_code = sd_power_gpregret_set(1,BOOTLOADER_DFU_START);
    err_code = sd_power_gpregret_set(0,BOOTLOADER_DFU_START);
	
	NRF_LOG_INFO(&amp;quot;err code %d&amp;quot;,err_code);
	VERIFY_SUCCESS(err_code);
    NRF_LOG_INFO(&amp;quot;Register Set Success&amp;quot;);
    
	user_write_flash(0x00022000,(uint32_t)0x12341234);

   // m_dfu.evt_handler(BLE_DFU_EVT_BOOTLOADER_ENTER);

    nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_DFU);

    return NRF_SUCCESS;
}  &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;i have checked gpregister using &amp;quot;nrfjprog --memrd 0x4000051c&amp;quot;&amp;nbsp; and it returns&amp;nbsp;&lt;span&gt;0x4000051c&lt;/span&gt;&amp;nbsp;: 0xB1&lt;/p&gt;
&lt;p&gt;and&amp;nbsp;&lt;span&gt;&amp;quot;nrfjprog --memrd 0x00022000&amp;quot;&amp;nbsp; returns 0x00022000&lt;/span&gt;&lt;span&gt;: 0x12341234.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Even i do&amp;nbsp; nrfjprog --reset from cmd prompt after setting gpregister and memory location , the BLE application restarts.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In Bootloader i did like this.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
uint32_t DFU_Flag_data  = 0;

main() {
	...
	....
uint32_t* dfu_flag_mem2 = (uint32_t*) 0x00022000;
DFU_Flag_data = (uint32_t)*dfu_flag_mem2 ;
	...
	....
}

extern uint32_t DFU_Flag_data;

ret_code_t nrf_bootloader_init(nrf_dfu_observer_t observer) {
	...
	....
	..

    switch (activation_result)
    {
        case ACTIVATION_NONE:
            initial_timeout = NRF_BOOTLOADER_MS_TO_TICKS(NRF_BL_DFU_INACTIVITY_TIMEOUT_MS);
            dfu_enter       = dfu_enter_check();

           if(DFU_Flag_data != 0xFFFFFFFF) {
              dfu_enter = true;
            }

	...
	}
	...
	if(dfu_enter) {
		// enter to dfu
	} else {
		//start application
	}
}


static bool dfu_enter_check(void) {
    if (NRF_BL_DFU_ENTER_METHOD_GPREGRET &amp;amp;&amp;amp;
       (nrf_power_gpregret_get() &amp;amp; BOOTLOADER_DFU_START))
    {
        NRF_LOG_DEBUG(&amp;quot;DFU mode requested via GPREGRET.&amp;quot;);
        return true;
    }
}

sdk_config.h
#define NRF_BL_DFU_ENTER_METHOD_GPREGRET 1

#define NRF_BL_DFU_ENTER_METHOD_BUTTONLESS 1

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Anything else is missing in application or Bootloader settings ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 Not jumping Bootloader from BLE Application</title><link>https://devzone.nordicsemi.com/thread/521768?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2025 15:09:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7b67f32-31da-4d64-bb20-75a222a17e49</guid><dc:creator>JoEi</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;did you clear the register before trying to enter the bootloader?&lt;br /&gt;That&amp;#39;s the function I normally use to enter the bootloader:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void app_enter_dfu_bootloader(void)
{
  uint32_t err_code;

  err_code = sd_power_gpregret_clr(0, 0xffffffff);
  VERIFY_SUCCESS(err_code);

  err_code = sd_power_gpregret_set(0, 0xB1);
  VERIFY_SUCCESS(err_code);

  // Signal that DFU mode is to be enter to the power management module
  nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_DFU);
 
  /* this should not be reached! */
  NVIC_SystemReset();
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Johannes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>