<?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>DFU without rebooting nRF</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42829/dfu-without-rebooting-nrf</link><description>Is there a supported way of doing an unsecure flash (the nRF is hardwired via UART to a secure processor) without rebooting? 
 The HW design the nRF is integrated with uses the nRF as as the main CPU power sequencer and thus cannot be rebooted to allow</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 May 2019 00:53:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42829/dfu-without-rebooting-nrf" /><item><title>RE: DFU without rebooting nRF</title><link>https://devzone.nordicsemi.com/thread/189736?ContentTypeID=1</link><pubDate>Wed, 29 May 2019 00:53:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:028654c4-eb32-4f3c-a4c7-4c51ffe4e16b</guid><dc:creator>honsch</dc:creator><description>&lt;p&gt;Looking at the bootloader code filled in the missing gaps.&lt;/p&gt;
&lt;p&gt;Thanks for letting me know where the correct process is.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU without rebooting nRF</title><link>https://devzone.nordicsemi.com/thread/189483?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 07:57:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58538745-d11f-4199-af97-e728cafdb70e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;You don&amp;#39;t need to reset CPU to switch program. Please have look at&amp;nbsp;nrf_bootloader_app_start() function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You always have access to all of CPU registers (interrupt) when you are in bootloader mode.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU without rebooting nRF</title><link>https://devzone.nordicsemi.com/thread/189407?ContentTypeID=1</link><pubDate>Mon, 27 May 2019 17:28:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea34881b-bf45-4894-9450-5996d8052ab9</guid><dc:creator>honsch</dc:creator><description>&lt;p&gt;I cannot use the Nordic supplied methods for switching which program is running.&lt;/p&gt;
&lt;p&gt;Using the Nordic bootloader requires resetting the CPU to switch programs and I cannot do that.&amp;nbsp; This is a REQUIREMENT of the hardware design.&lt;/p&gt;
&lt;p&gt;How do I turn off the memory protection so that I may access all of the CPU registers?&amp;nbsp; If this is not possible then we cannot have any DFU code. It is that simple.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU without rebooting nRF</title><link>https://devzone.nordicsemi.com/thread/189212?ContentTypeID=1</link><pubDate>Mon, 27 May 2019 07:41:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7cae5f4-8272-446d-81d2-155ed4e7033e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Eric,&lt;/p&gt;
&lt;p&gt;I understand that you are not using the bootloader.&lt;/p&gt;
&lt;p&gt;But as your requirement we need to run your application as a bootloader (so that you can replace the softdevice, change the vectortable location etc).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To run your application as a bootloader you need to follow what we do in our bootloader and implement that in your application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In SDK v15.0 to tell the MBR that you have a bootloader (at address 0x40000 for example) you need to write to UICR&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please have a look at the attribute commands inside nrf_bootloader_info.c , this is where we write to UICR to tell the MBR where the bootloader (your application ) is.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU without rebooting nRF</title><link>https://devzone.nordicsemi.com/thread/189113?ContentTypeID=1</link><pubDate>Fri, 24 May 2019 17:35:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c228881e-31ab-4195-b9ba-dfb5a26ef344</guid><dc:creator>honsch</dc:creator><description>&lt;p&gt;Hug,&lt;/p&gt;
&lt;p&gt;We&amp;#39;re not using a bootloader, our app was originally based on the ble peripheral uart example.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;The SDK is 15.0.0 a53641a with softdevice 132 v6.0.0.&lt;/p&gt;
&lt;p&gt;The DFU&amp;nbsp; happens after the softdevice is enabled via a command over a hardwired serial connection.&amp;nbsp; The nRF&amp;#39;s main job is reading a bunch of sensors and acting as a BT conduit to the main CPU.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU without rebooting nRF</title><link>https://devzone.nordicsemi.com/thread/188993?ContentTypeID=1</link><pubDate>Fri, 24 May 2019 09:09:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b149a530-9789-4eaf-baa6-e8226a24b8a9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Eric,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One thing we need to clarify is that if you run your application as the bootloader or not. Your application is treated as the bootloader (so that the softdevice wouldn&amp;#39;t initialize before your application ) when the MBR forwarding the PC and vector table to you. This is done by writing the address of the bootloader to UICR (in SDK v15.2 and earlier) or to the MBR setting page (SDK v15.3) .&lt;/p&gt;
&lt;p&gt;Which SDK are you using ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If your device is running as a bootloader, there shouldn&amp;#39;t be a problem to update the softdevice (the same way as our current bootloader). However, if the softdevice is already initialized (if you start to use BLE) I don&amp;#39;t see any easy way to replace the softdevice without a reboot.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU without rebooting nRF</title><link>https://devzone.nordicsemi.com/thread/188923?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 23:19:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:154804a5-be24-4298-a77f-90370babdabf</guid><dc:creator>honsch</dc:creator><description>&lt;p&gt;Hung,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve finally gotten back to this task.&lt;/p&gt;
&lt;p&gt;I modified my original project to use only the first 256K of flash and 48K of RAM.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve created a new peripheral uart example based app that does not use the softdevice. It gets flashed to 0x40000 and runs when I branch to the .init start address.&lt;/p&gt;
&lt;p&gt;The problem I have is interrupts.&amp;nbsp; I don&amp;#39;t get any even after calling sd_softdevice_vector_table_base_set()&lt;/p&gt;
&lt;p&gt;Even if I did it wouldn&amp;#39;t solve the problem of flashing a new softdevice with the firmware updater.&lt;/p&gt;
&lt;p&gt;What I need to do is fully disable the softdevice, unprotect the entire system, set SCB-&amp;gt;VTOR to my vector table so I can erase and reflash whatever I need to.&amp;nbsp; The only peripherals I need access to are UART0, a timer, PWM, GPIO, and the CPU registers to erase and program the flash memory.&amp;nbsp; Bluetooth is not used at all during the update procedure.&lt;/p&gt;
&lt;p&gt;Is this even possible?&amp;nbsp; The final HW design uses the nRF as a power sequencer for the main CPU and rebooting it resets the main CPU so I cannot ever reset the CPU during a flash update.&amp;nbsp; After the flash update is complete I can reboot, but not before.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for any advice,&lt;/p&gt;
&lt;p&gt;Eric&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU without rebooting nRF</title><link>https://devzone.nordicsemi.com/thread/167304?ContentTypeID=1</link><pubDate>Wed, 23 Jan 2019 09:40:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a08ba1c7-4864-4c28-baf8-bc31bfea88ee</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I assume you will not have any bootloader but receive and store the image using your application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to use&amp;nbsp;&lt;span&gt;sd_softdevice_vector_table_base_set() you would need to run your application as a bootloader. Meaning the MBR when booting goes straight to your application ( which works as a bootloader ). Please have a look at the booting sequence &lt;a href="https://www.nordicsemi.com/DocLib/Content/SoftDevice_Spec/s132/latest/SDS/s1xx/mbr_bootloader/mbr_sd_reset_behavior"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU without rebooting nRF</title><link>https://devzone.nordicsemi.com/thread/167199?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 19:17:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8530f30d-0d22-45cf-a955-30f66d14967b</guid><dc:creator>honsch</dc:creator><description>&lt;p&gt;Hung,&lt;/p&gt;
&lt;p&gt;Yes, we are downloading a new image from a secured internet connection and want to flash the nRF via a hardwired UART connection.&lt;/p&gt;
&lt;p&gt;Thank you for the hint on ble_stack_init().&amp;nbsp; I&amp;#39;ll look in to it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU without rebooting nRF</title><link>https://devzone.nordicsemi.com/thread/167121?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 13:47:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9af7ee2b-aa8e-4641-994b-9fb34913e22f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Honsch,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you clarify what exactly you need ? How do you receive the image ? &lt;br /&gt;I assume you receive the new image in your application and want to switch to the new image without trigger a reset ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s actually possible, but you need to change the vector table forwarding of the softdevice to point to the new image.&amp;nbsp;You can do that by calling&amp;nbsp;sd_softdevice_vector_table_base_set() but your application need to run as it&amp;#39;s in bootloader mode (MBR forward interrupt to the bootloader/application instead of the softdevice)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please refere to&amp;nbsp;ble_stack_init() in nrf_dfu_ble.c in our bootloader&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>