<?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 SPI Bootloader (from Flash)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24934/custom-spi-bootloader-from-flash</link><description>Hello. 
 I want to develop a custom bootloader with the same purpose as described in Very simple SPI bootloader 
 I&amp;#39;m using a 52832 with Eclipse/GCC and nRF SDK V13.0 
 As basis i was using the secure BLE dfu example. The example itself is working</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Sep 2017 12:47:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24934/custom-spi-bootloader-from-flash" /><item><title>RE: Custom SPI Bootloader (from Flash)</title><link>https://devzone.nordicsemi.com/thread/98175?ContentTypeID=1</link><pubDate>Wed, 13 Sep 2017 12:47:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94ce7d78-b57d-4a72-af17-b89c89c2855b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The next step would be to be able to debug the bootloader. When compiling with optimization level to 0, you will need to allocate more flash space for the bootloader in the .ld file.&lt;/p&gt;
&lt;p&gt;You will also need to add &lt;code&gt;-fomit-frame-pointer&lt;/code&gt; to the compiler flags for it to compile correctly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom SPI Bootloader (from Flash)</title><link>https://devzone.nordicsemi.com/thread/98174?ContentTypeID=1</link><pubDate>Wed, 06 Sep 2017 09:25:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8a2a628-77bc-428f-bc7f-f4e3f1062bcb</guid><dc:creator>Vehring</dc:creator><description>&lt;p&gt;I get the feeling (no, i still can&amp;#39;t compile a debug compatible firmware), that the problem is related to the spi. I can initialize an spi interface but working with it is not possible. May it be related to the Easy DMA?&lt;/p&gt;
&lt;p&gt;A typical read from flash looks like this (m_spi_xfer_done is set by the dma callback when transfer was executed):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (pin_cs &amp;gt; 0){Flash_AT25_select();}
flash_spi-&amp;gt;m_spi_xfer_done = false;
err_code = nrf_drv_spi_transfer(&amp;amp;flash_spi-&amp;gt;m_spi_instance,&amp;amp;m_tx_buf,4,&amp;amp;m_rx_buf,length_bytes+4);
while (!flash_spi-&amp;gt;m_spi_xfer_done)
{
	//Prevent Low Power State
	__WFE();
}
if (pin_cs &amp;gt; 0){Flash_AT25_unselect();}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So, first question: I read now about the interrupt forwarding of the mbr. how does it work? Do i need the forwarding here?
I have a softdevice flashed (S132 V4.0.2), but want to leave it disabled if possible in the bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>