<?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>SDK15 Secure bootloader timeout limit</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39141/sdk15-secure-bootloader-timeout-limit</link><description>Hi, 
 I am using the secure bootloader as a template and I want to use the inactivity timeout to shutdown after 10 minutes. 
 I saw that the limit should be 60000000 ms (according to the notation in the code) however i can only use it up to approx 6 minute</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Oct 2018 07:43:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39141/sdk15-secure-bootloader-timeout-limit" /><item><title>RE: SDK15 Secure bootloader timeout limit</title><link>https://devzone.nordicsemi.com/thread/151768?ContentTypeID=1</link><pubDate>Fri, 05 Oct 2018 07:43:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80646327-f5e5-44b6-acd7-4d04931a0f5b</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;The reason it fails is due to this assertion:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ASSERT(timeout_ticks &amp;lt;= MAX_TIMEOUT_TICKS);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It fires from &lt;em&gt;main()&lt;/em&gt;--&amp;gt;&lt;em&gt;nrf_bootloader_init(..)&lt;/em&gt;--&amp;gt;&lt;em&gt;nrf_bootloader_dfu_inactivity_timer_restart(..)&lt;/em&gt;--&amp;gt;&lt;em&gt;timer_start(..)&lt;/em&gt;--&amp;gt;&lt;em&gt;timer_activate(..)&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;MAX_TIMEOUT_TICKS is defined as 16777215 ticks, which corresponds to ((&lt;span&gt;16777215*1000)/32768) = 511 999 ms (8.53 minutes). The following is commented about this definition:&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;&amp;quot;The longest fire timeout allowed. Longer timeouts are handled by multiple firings.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Thus, this can be resolved by adding mechanisms to the callback function fed into&amp;nbsp;&lt;em&gt;nrf_bootloader_dfu_inactivity_timer_restart(..). &lt;/em&gt;For example, you can set the timeout to 5 minutes, and restart only when the timeout callback function has fired twice.&lt;/p&gt;
&lt;p&gt;Best regards, Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>