<?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>Timing bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51582/timing-bootloader</link><description>My firmware goes into system off state when idle and wakes on GPIO (button input). I want to display an indication to the user for a fixed duration, so I will modify the bootloader to set the GPIO output, but I need to know how long the bootloader took</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Aug 2019 11:39:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51582/timing-bootloader" /><item><title>RE: Timing bootloader</title><link>https://devzone.nordicsemi.com/thread/207122?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 11:39:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cb4243d-697b-4325-aac4-25d682fe6ec2</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;You need to start the LFCLK so that the RTC has a clock source, i.e.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;while(!EVENTS_LFCLKSTARTED) {&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;// wait for LFCLK to start before starting RTC&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;}&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timing bootloader</title><link>https://devzone.nordicsemi.com/thread/207096?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 10:28:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed3506d9-9f48-4f46-b56c-dab8b016b3c3</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;Thanks. In the bootloader I have this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_RTC2-&amp;gt;TASKS_STOP = 1;
NRF_RTC2-&amp;gt;TASKS_CLEAR = 1;
NRF_RTC2-&amp;gt;PRESCALER = 0;
NRF_RTC2-&amp;gt;TASKS_START = 1;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In the firmware I have this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint32_t count = NRF_RTC2-&amp;gt;COUNTER;
uint32_t ms = count * 1000 / 32768;
NRF_RTC2-&amp;gt;TASKS_STOP = 1;
NRF_RTC2-&amp;gt;TASKS_CLEAR = 1;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;However, ms is 0. Am I missing something?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timing bootloader</title><link>https://devzone.nordicsemi.com/thread/206977?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 05:55:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ecd8cb7-8b40-479d-8cd5-39c258843633</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Nick,&lt;/p&gt;
&lt;p&gt;you can start a TIMER or RTC upon entering the bootloader. Since the bootloader branches to the applicatio, the TIMER or RTC will keep running and you can stop and read out the counter value in the application,&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>