<?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>Boot Loader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32360/boot-loader</link><description>Hi, 
 I&amp;#39;m trying to write custom boot loader, that receiving hex file via uart and write it to location 0x40000 and then jumps to the location. I changed FLASH_ADDRESS and FLASH_PH_ADDRESS to 0x40000 and built two applications from examples: blinky_pca10056</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 08 Apr 2018 04:26:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32360/boot-loader" /><item><title>RE: Boot Loader</title><link>https://devzone.nordicsemi.com/thread/127303?ContentTypeID=1</link><pubDate>Sun, 08 Apr 2018 04:26:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfb72672-dd3c-445b-962a-0dcb716ab477</guid><dc:creator>Dinkin Uri</dc:creator><description>&lt;p&gt;Thank you, I will check initialization of interrupt vectors before I jump to program.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Boot Loader</title><link>https://devzone.nordicsemi.com/thread/126614?ContentTypeID=1</link><pubDate>Tue, 03 Apr 2018 09:17:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de6c57a2-d25c-432a-a37f-7e26206ff46b</guid><dc:creator>Rune Holmgren</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Most if not all debuggers will have an option to &amp;quot;Attach to running program&amp;quot;. It is mostly like running a regular debugging session, the only difference being that you need to let the DFU process perform the flashing. Attaching to a running program this will not interfere with the flash and DFU operations, so you can start the debugger and have it running already when the bootloader is running with some breakpoints in the application to verify that a switch takes place as expected.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/873x690/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-60af701926804855b84fc3f1da0abef3/attach.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Based on the description of the LED being updated and the _WFE call, it sounds like your application initializes without an error being returned, but no interrupts are received after initialization. You need to debug it to get any useful details helping you resolve the issue.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Rune Holmgren&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Boot Loader</title><link>https://devzone.nordicsemi.com/thread/125861?ContentTypeID=1</link><pubDate>Sun, 25 Mar 2018 05:09:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05c588af-bdef-4b6d-a3a1-c6216195230e</guid><dc:creator>Dinkin Uri</dc:creator><description>&lt;p&gt;Thank you for your answer.&lt;/p&gt;
&lt;p&gt;I do not use in SoftDevice, that is why I do not use&amp;nbsp;&lt;span&gt;nrf_bootloader_app_start, but directly call to&amp;nbsp;nrf_bootloader_app_start_impl. This is a code&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt; NVIC-&amp;gt;ICER[0]=0xFFFFFFFF;&lt;br /&gt; NVIC-&amp;gt;ICPR[0]=0xFFFFFFFF;&lt;br /&gt; NVIC-&amp;gt;ICER[1]=0xFFFFFFFF;&lt;br /&gt; NVIC-&amp;gt;ICPR[1]=0xFFFFFFFF;&lt;br /&gt; app_uart_close();&lt;br /&gt; nrf_drv_clock_lfclk_release();&lt;br /&gt; while (nrf_clock_lf_is_running()) {;}&lt;br /&gt; nrf_drv_clock_uninit();&lt;br /&gt; nrf_bootloader_app_start_impl(0x40000);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;after this command it is entering to main of&amp;nbsp;&lt;strong&gt;led_softblink_pca10056&lt;/strong&gt;,&amp;nbsp;I&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;see all leds are on, but then it enters in&amp;nbsp;loop with&amp;nbsp; _WFE(), but this application&amp;nbsp;is not using events, so I do not know&amp;nbsp; why leds are not blinking, I would like to debug it, but I do not know how debug application that I jumping to. Can you give me a direction?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Boot Loader</title><link>https://devzone.nordicsemi.com/thread/125492?ContentTypeID=1</link><pubDate>Thu, 22 Mar 2018 10:04:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d87325b4-861f-4d5d-9e4d-2936a20a3a0e</guid><dc:creator>Rune Holmgren</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can debug an application even if it was added to the device though DFU. You should probably try to debug the&amp;nbsp;softblink&amp;nbsp;application to verify that it&amp;#39;s running and when it stops running.&lt;/p&gt;
&lt;p&gt;If you have a look at when nrf_bootloader_app_start_impl is called in SDK14.2.0 (and older versions as far as I can recall) nrf_bootloader_app_start does a few important things before performing the switch. Interrupts are disabled and the vector table used by the SoftDevice to determine where to send events is set. Additionally, you may need to disable timers or clocks you have started like you can see on line 229 in nrf_dfu.c.&lt;/p&gt;
&lt;p&gt;Generally, what you need to do is removing any sort of conditions where an interrupt can cause code to run which the application wasn&amp;#39;t ready for. If you are getting unexpected interrupts from hardware or the SoftDevice events are still being sent to the now uninitialized bootloader your system will crash quickly.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Rune Holmgren&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>