<?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>Custom firmware updater (dual bank) on nrf51822 + s130 ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12212/custom-firmware-updater-dual-bank-on-nrf51822-s130</link><description>Hello. 
 How to write custom firmware updater, which: 
 
 
 Takes new firmware from other device on SPI or I2C bus. 
 
 
 Writes it to flash (&amp;quot;bank1&amp;quot; at 0x1B000, or &amp;quot;bank2&amp;quot; at 0x25000), for example, with ble_flash_word_write() (BLE radio is off</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Mar 2016 12:29:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12212/custom-firmware-updater-dual-bank-on-nrf51822-s130" /><item><title>RE: Custom firmware updater (dual bank) on nrf51822 + s130 ?</title><link>https://devzone.nordicsemi.com/thread/46207?ContentTypeID=1</link><pubDate>Wed, 02 Mar 2016 12:29:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:762059c4-9dbc-4d88-b73a-aedc437ee261</guid><dc:creator>Alex Pristenskiy</dc:creator><description>&lt;p&gt;For now, I just want to try to run app at 0x1B000 from bootloader: &lt;a href="https://devzone.nordicsemi.com/question/70080/nrf51822-s130-200-7alpha-bare-minimum-bootloader-which-starts-app-at-0x1b000/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom firmware updater (dual bank) on nrf51822 + s130 ?</title><link>https://devzone.nordicsemi.com/thread/46206?ContentTypeID=1</link><pubDate>Wed, 02 Mar 2016 10:57:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97e7b2aa-33e1-452c-966c-5eba147831d0</guid><dc:creator>Alex Pristenskiy</dc:creator><description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;But examples at examples\dfu\bootloader\ are for nRF51422_xxAC chip, while I&amp;#39;m have nRF51822_xxAA with less RAM and Flash.&lt;/p&gt;
&lt;p&gt;Could you please explain how &amp;quot;forward interrupts&amp;quot; works internally? I.e. does sd_softdevice_vector_table_base_set() copy new interrupt vector table to default location or someting else?&lt;/p&gt;
&lt;p&gt;Now I&amp;#39;m trying to implement bare minimum bootloader, where all functions are in main.c only, which:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;starts itself - it works now.&lt;/li&gt;
&lt;li&gt;starts default application - it doesn&amp;#39;t work now, it hangs (HardFault interrupt) at sd_softdevice_vector_table_base_set(CODE_REGION_1_START) call.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href="http://pastebin.com/S4wt1fsn"&gt;http://pastebin.com/S4wt1fsn&lt;/a&gt; - all the bootloader code is 325 lines, it initializes UART and waits &amp;#39;s&amp;#39; char from terminal to start application at 0x1B000 (for test purposes) that already flashed aerlier. But unfortunately it doesn&amp;#39;t work, maybe I forgot some initialization code? should I initialize s130 in bootloader if s130 softdevice present in flash ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom firmware updater (dual bank) on nrf51822 + s130 ?</title><link>https://devzone.nordicsemi.com/thread/46205?ContentTypeID=1</link><pubDate>Wed, 02 Mar 2016 10:40:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:035abdf9-e04d-41f7-af20-40c900363708</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I&amp;#39;d recommend downloading  &lt;a href="http://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v11.x.x/nRF5_SDK_11.0.0-2.alpha_bc3f6a0.zip"&gt;SDK v.11.0.0 alpha&lt;/a&gt; as it&amp;#39;s already configured for  the s130 2.0.0-7.alpha and includes the serial &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/examples_ble_dfu.html?cp=4_0_0_4_2_1"&gt;bootlaoder&lt;/a&gt;. Note that this example is using UART, but can be modified to use a different transport layer as long as it&amp;#39;s reliable.&lt;/p&gt;
&lt;p&gt;The sd_softdevice_vector_table_base_set() call is used to tell the softdevice to where the application is located. That is, where it should forward interrupts. This SV instruction is called from the bootloader before branching to the application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>