<?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>nrf52832 simple FW updater</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53732/nrf52832-simple-fw-updater</link><description>Hi everyone. I&amp;#39;ve implemented kind of simple FW updater. The purpose is to copy FW from flash (0x0 address, no MBR or SoftDevice) to RAM buffer on node1. than send this FW to node2 by a couple of packets via ESB. After receive all FW data, execute FW</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 30 Oct 2019 14:53:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53732/nrf52832-simple-fw-updater" /><item><title>RE: nrf52832 simple FW updater</title><link>https://devzone.nordicsemi.com/thread/217580?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2019 14:53:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a20cd5d8-0357-466a-9173-95f71812d2e5</guid><dc:creator>Ivan</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/3073.mem-compare.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;Here is memory compare of flashed by degguger and OTA via ESB , than using flash rewrite via RAM function. It&amp;#39;s same, and same working, but after OTA flash - no reset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 simple FW updater</title><link>https://devzone.nordicsemi.com/thread/217524?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2019 12:36:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efa60c26-fce4-4a99-9a42-239dd51d70e4</guid><dc:creator>Turbo J</dc:creator><description>[quote userid="71428" url="~/f/nordic-q-a/53732/nrf52832-simple-fw-updater/217478"]Actually I start from this, I call this function in my first example, after rewriting flash. But board won&amp;#39;t reset.[/quote]
&lt;p&gt;Maybe Invalid Vector table?&lt;/p&gt;
&lt;p&gt;Look at the first 8 Flash bytes after changing firmware. First 4 bytes must be an end of RAM pointer (inital stack pointer) and next 4 bytes must be an odd value for Reset handler with T bit. Remember that the processor is little endian.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 simple FW updater</title><link>https://devzone.nordicsemi.com/thread/217486?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2019 10:15:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d92c878-c190-44b1-8692-e04a8267fa5d</guid><dc:creator>Ivan</dc:creator><description>&lt;p&gt;As I notice, after flash write, no code is working, I test to trigger some GPIO via non-lib direct functions.&lt;br /&gt;But It works only after erase, but not after rewriting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 simple FW updater</title><link>https://devzone.nordicsemi.com/thread/217484?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2019 10:09:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee2154cd-3542-42da-808f-718fee8d3c07</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote userid="71428" url="~/f/nordic-q-a/53732/nrf52832-simple-fw-updater/217478"]But board won&amp;#39;t reset.[/quote]
&lt;p&gt;That is very strange, if that is true, then you should first investigate what is stopping it to reset. I am not sure if there are some settings in ARM core that could prevent it resetting when using NVIC_SystemReset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 simple FW updater</title><link>https://devzone.nordicsemi.com/thread/217478?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2019 09:53:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:963458a9-289d-4186-a3e4-77ae3dd47f02</guid><dc:creator>Ivan</dc:creator><description>&lt;p&gt;Actually I start from this, I call this function in my first example, after rewriting flash. But board won&amp;#39;t reset.&lt;br /&gt;It can be resetted via button no problem, or when I connect a debugger, I get to the entry point.&lt;br /&gt;But it won&amp;#39;t done automatically... Now only helps to trigger a delayed reset before FW copy via GPIO output and delayed IC back to HW reset pin...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 simple FW updater</title><link>https://devzone.nordicsemi.com/thread/217472?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2019 09:41:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e25bc8e0-3c9f-4256-ac4c-10e86fcbd39f</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;After the final copy from the RAM to flash at 0x0, you need to execute NVIC_SystemReset instead of branching to 0x0.&lt;/p&gt;
&lt;p&gt;That way , you wil make sure that all the registers are in proper state to execute the new reset handler from the vector table&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 simple FW updater</title><link>https://devzone.nordicsemi.com/thread/217175?ContentTypeID=1</link><pubDate>Mon, 28 Oct 2019 16:14:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e047a10-998c-4a8a-a892-6cb106f58175</guid><dc:creator>Ivan</dc:creator><description>&lt;p&gt;I find that flash is correct from 0x0 address, but after rewriting and resetting board, program stays at Reset Handler.&lt;br /&gt;And now is question, how to jump to main() in this case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 simple FW updater</title><link>https://devzone.nordicsemi.com/thread/217100?ContentTypeID=1</link><pubDate>Mon, 28 Oct 2019 13:46:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c333839f-11f1-4661-a76e-3f4e45cd48bc</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Normal linked firmware contains interrupt vector table at address zero - which does not contain executable instructions but executable &lt;em&gt;addresses &lt;/em&gt; instead.&lt;/p&gt;
&lt;p&gt;The &amp;quot;switch to firmware&amp;quot; on an ARM Cortex-M is loading the MSP from the 4-byte value at address zero, and then loading the PC from the next four bytes (RESET function address with T bit set). Usually done in assembler since stack is changing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>