<?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>sd_ble_enable causing hang if application is jumped to from bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3422/sd_ble_enable-causing-hang-if-application-is-jumped-to-from-bootloader</link><description>I am using sd 7.0.0, I have a simple bootloader implementation that follows the bootloader sample code pretty closely. When I jump to my application from the bootloader and call sd_ble_enable, it hangs inside the SVC_handler. If I load my application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Aug 2014 22:26:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3422/sd_ble_enable-causing-hang-if-application-is-jumped-to-from-bootloader" /><item><title>RE: sd_ble_enable causing hang if application is jumped to from bootloader</title><link>https://devzone.nordicsemi.com/thread/12423?ContentTypeID=1</link><pubDate>Tue, 12 Aug 2014 22:26:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ac2f2f8-9537-4661-9690-e8c2e306e111</guid><dc:creator>MichaelVPI</dc:creator><description>&lt;p&gt;ONE MORE UPDATE:
I later found that NVIC_SystemReset() isn&amp;#39;t a good strategy since this should continuously boot you into the bootloader (I think) as opposed to the application. I found that calling JumpToApplication() works with no problems if, from the application, you initialize softdevice (using mbr_command) and set up the vector table directly after this.&lt;/p&gt;
&lt;p&gt;I think this is because there is some initialization that has to happen in SD before calling sd_ble_enable(), and since this function sets the vector table&amp;#39;s address to SD&amp;#39;s vector table (maybe it&amp;#39;s needed for initialization), you have to set it back to the application. Some of this was spelled out in the bootlaoder example code, I just wasn&amp;#39;t sure if the same would apply to the application that the bootloader is jumping to.&lt;/p&gt;
&lt;p&gt;So in other words, if the application is jumped to from the bootloader instead of directly from the mbr/SD, then the application also must initialize SD and set the vector table to the application vector table directly after.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_enable causing hang if application is jumped to from bootloader</title><link>https://devzone.nordicsemi.com/thread/12422?ContentTypeID=1</link><pubDate>Tue, 12 Aug 2014 12:36:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e53e8f00-5327-4abc-9658-da4a880402e2</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Glad to hear you have it working.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_enable causing hang if application is jumped to from bootloader</title><link>https://devzone.nordicsemi.com/thread/12421?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2014 21:31:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c29e172d-bfd1-4cca-8f21-02eeab066517</guid><dc:creator>MichaelVPI</dc:creator><description>&lt;p&gt;UPDATE: I was able to get it to work by setting the vector table address to the start of SD 7.0.0 (0x1000) instead of the application and calling NVIC_SystemReset(). Thanks for the help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_enable causing hang if application is jumped to from bootloader</title><link>https://devzone.nordicsemi.com/thread/12420?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2014 17:48:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e01bc42a-25b9-400c-b298-318438fa54e5</guid><dc:creator>MichaelVPI</dc:creator><description>&lt;p&gt;I just tried NVIC_SystemReset() in place of JumpToApplication() with no success unfortunately.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_enable causing hang if application is jumped to from bootloader</title><link>https://devzone.nordicsemi.com/thread/12419?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2014 14:29:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80b70301-fece-497d-8371-543496c7e009</guid><dc:creator>John</dc:creator><description>&lt;p&gt;I have not yet done the upgrade to use the SD 7.0.0 so I am not very familiar with the MBR stuff yet. However, after perusing the documentation a bit one line from the details section on the sd_mbr_command_vector_table_base_set_t caught my eye:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;quot;Once this function has been called, this address is where the MBR will start to forward interrupts to after a reset.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So perhaps a reset is required rather than jumping to the application?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>