<?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>Secure bootloader - SDK12.2.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18265/secure-bootloader---sdk12-2-0</link><description>While using the secure bootloader image and test application works consistently using the development kit I have not been able to port the solution reliably for our custom PCB. I suspect the image generation is done incorrectly on my behalf. 
 Tools</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 12 Jul 2017 06:04:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18265/secure-bootloader---sdk12-2-0" /><item><title>RE: Secure bootloader - SDK12.2.0</title><link>https://devzone.nordicsemi.com/thread/70531?ContentTypeID=1</link><pubDate>Wed, 12 Jul 2017 06:04:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8c6bf8e-d58e-491a-98aa-0dc96dccd7ca</guid><dc:creator>yichen</dc:creator><description>&lt;p&gt;can you tell me how you do in dfu mode with wdt...thank you very much&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure bootloader - SDK12.2.0</title><link>https://devzone.nordicsemi.com/thread/70530?ContentTypeID=1</link><pubDate>Wed, 12 Jul 2017 06:03:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8a2804e-76a4-417c-a0c9-17f4cd6dddeb</guid><dc:creator>yichen</dc:creator><description>&lt;p&gt;i open the wdt, and in the efu, i start a timer with 1 second,
void wdt_timeout_handler(void * p_context)
{
nrf_gpio_pin_toggle(18);
NRF_WDT-&amp;gt;RR[0]=WDT_RR_RR_Reload;
}
#define WDT_INTERVAL			           APP_TIMER_TICKS(1000,APP_TIMER_PRESCALER)&lt;/p&gt;
&lt;p&gt;APP_TIMER_DEF(wdt_timer_id);&lt;/p&gt;
&lt;p&gt;when i not open the wdt,i let NRF_POWER-&amp;gt;GPREGRET == BOOTLOADER_DFU_START,and it in dfu mode,the led is togle,mains that the timer is work. and then,i open the wdt,#define WDT_CONFIG_RELOAD_VALUE 7000, then i can&amp;#39;t come in dfu mode,when i send dfu cmd,after 7 second ,the device is restart in application mode&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure bootloader - SDK12.2.0</title><link>https://devzone.nordicsemi.com/thread/70529?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2017 17:54:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cbefe63-69a8-4e83-b9d0-88da17f9d2ec</guid><dc:creator>kagislason</dc:creator><description>&lt;p&gt;Sorry for the late answer, did not get a notification of this comment.&lt;/p&gt;
&lt;p&gt;I added this to my main application, after receiving a firmware update request from the central I set the GPREGRET register as &amp;quot;some hex code&amp;quot; and then restart the chip. Afterwards it wakes up in bootloader and checks if NRF_POWER-&amp;gt;GPREGRET == &amp;quot;some hex code&amp;quot;, if so I start DFU else boot up into main.&lt;/p&gt;
&lt;p&gt;As for the bond information I did not implement anything there for now, I will need to take another spin at this soon.&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure bootloader - SDK12.2.0</title><link>https://devzone.nordicsemi.com/thread/70528?ContentTypeID=1</link><pubDate>Fri, 09 Dec 2016 23:41:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2881b0c0-4e88-4c4e-b3d6-c9c361b44e9b</guid><dc:creator>WestCoastDaz</dc:creator><description>&lt;p&gt;kagislason,&lt;/p&gt;
&lt;p&gt;I am I correct in assuming that you either rewrote or modified ble_dfu.c to achieve the desired functionality?  You said &amp;quot;On the application side I set the register and then call my power reset function (housekeeping then restart):&amp;quot;  Where did you add this functionality, did you care about the bond data?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure bootloader - SDK12.2.0</title><link>https://devzone.nordicsemi.com/thread/70527?ContentTypeID=1</link><pubDate>Fri, 09 Dec 2016 22:23:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3b55642-f343-438c-9cd7-8a73713b11f4</guid><dc:creator>WestCoastDaz</dc:creator><description>&lt;p&gt;kagislason,&lt;/p&gt;
&lt;p&gt;Thanks for the help, I really appreciate it!&lt;/p&gt;
&lt;p&gt;As for the WDT issue I&amp;#39;m glad I was able to help.  Beware Nordic&amp;#39;s implementation of the WDT is very different that anything I have used in previous micro&amp;#39;s.  Once it&amp;#39;s turned on it can&amp;#39;t be turned off via software!  It can only be stopped by a hardware reset or BOR/PUR.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure bootloader - SDK12.2.0</title><link>https://devzone.nordicsemi.com/thread/70526?ContentTypeID=1</link><pubDate>Fri, 09 Dec 2016 10:31:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:115e0803-7d5d-4a07-b59c-b5ac9d799b60</guid><dc:creator>kagislason</dc:creator><description>&lt;p&gt;As for the GPREGRET solution I set the register in my main application when receiving a firmware update request from our iOS app. This feature is protected with user roles and then using a unique static pin code/MITM protection.&lt;/p&gt;
&lt;p&gt;On the application side I set the register and then call my power reset function (housekeeping then restart):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sd_power_gpregret_set(0, (uint32_t)BOOTLOADER_DFU_START);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the bootloader I override the __WEAK nrf_dfu_enter_check() function. I removed the button/flash logic and added a check for GPREGRET:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   if (NRF_POWER-&amp;gt;GPREGRET == BOOTLOADER_DFU_START)
   {
      NRF_POWER-&amp;gt;GPREGRET = 0;
      return true;
   }
   return false;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure bootloader - SDK12.2.0</title><link>https://devzone.nordicsemi.com/thread/70525?ContentTypeID=1</link><pubDate>Fri, 09 Dec 2016 10:30:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02156935-0352-4a37-aa86-b49001c0eded</guid><dc:creator>kagislason</dc:creator><description>&lt;p&gt;This was indeed a watchdog issue, thanks!&lt;/p&gt;
&lt;p&gt;I was not aware that the watchdog would keep running after a soft reset. I had already done a WDT reload in the wait_for_event() function but I fixed the issue by also kicking the dog while processing the new firmware. I don&amp;#39;t like modifying SDK files (for future updates and clarity) so I will try to find a more elegant solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure bootloader - SDK12.2.0</title><link>https://devzone.nordicsemi.com/thread/70524?ContentTypeID=1</link><pubDate>Thu, 08 Dec 2016 19:08:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c71b151-0aeb-490c-851e-90f555875c82</guid><dc:creator>WestCoastDaz</dc:creator><description>&lt;p&gt;kagislason,&lt;/p&gt;
&lt;p&gt;Do you have the watchdog turned on?  If so you need to keep kicking it in the boot loader.&lt;/p&gt;
&lt;p&gt;Also, are you willing to share the changes you made to return to using GPREGRET?  I&amp;#39;m just about to do this on our design.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>