<?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>the timer is 6 times faster</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60823/the-timer-is-6-times-faster</link><description>I updated a working project based on nRF52832_xxAA 32Mhz crystal, from nRF5 SDK 14.2.0 to nRF5 SDK 16.0.0 now the timer is 6 times faster, the code hasn&amp;#39;t changed is there any setting i miss?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Apr 2020 14:53:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60823/the-timer-is-6-times-faster" /><item><title>RE: the timer is 6 times faster</title><link>https://devzone.nordicsemi.com/thread/247392?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 14:53:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14842bb2-baaa-4c4a-9258-0b30b716afa8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;what does nrf_drv_timer_ms_to_ticks() return when you set 1, 2 and &amp;gt;2? E.g. 3 or 10?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: the timer is 6 times faster</title><link>https://devzone.nordicsemi.com/thread/247374?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 13:57:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b45d7f27-3c1a-40bc-ba83-23338f3abae8</guid><dc:creator>msquizzato</dc:creator><description>&lt;p&gt;I use default (16 MHz)&lt;br /&gt;&lt;br /&gt;nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG;&lt;br /&gt; err_code = nrf_drv_timer_init(&amp;amp;TIMER_SYS, &amp;amp;timer_cfg, timer_sys_event_handler);&lt;br /&gt;&lt;br /&gt;the strange thing is that if set&amp;nbsp;&lt;span&gt;TIMER_PERIOD&lt;/span&gt; to 1ms OK&amp;nbsp; 2ms OK,&amp;nbsp; &amp;gt; 2ms the time is wrong&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;time_ticks = nrf_drv_timer_ms_to_ticks(&amp;amp;TIMER_SYS, TIMER_PERIOD);&lt;br /&gt; nrf_drv_timer_extended_compare(&lt;br /&gt; &amp;amp;TIMER_SYS, NRF_TIMER_CC_CHANNEL0, time_ticks, NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, true);&lt;br /&gt; nrf_drv_timer_enable(&amp;amp;TIMER_SYS);&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div class="tlid-input input"&gt;
&lt;div class="source-wrap"&gt;
&lt;div class="input-full-height-wrapper tlid-input-full-height-wrapper"&gt;
&lt;div class="source-input"&gt;
&lt;div class="source-footer-wrap source-or-target-footer"&gt;
&lt;div class="character-count tlid-character-count"&gt;
&lt;div class="cc-ctr normal"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="source-footer"&gt;
&lt;div class="src-tts left-positioned ttsbutton jfk-button-flat source-or-target-footer-button jfk-button"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="tlid-results-container results-container"&gt;
&lt;div class="tlid-result result-dict-wrapper"&gt;
&lt;div class="result tlid-copy-target"&gt;
&lt;div class="result-header"&gt;
&lt;div class="starbutton jfk-button-flat jfk-button unstarred"&gt;
&lt;div class="jfk-button-img"&gt;What could it be?&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="text-wrap tlid-copy-target"&gt;
&lt;div class="result-shield-container tlid-copy-target"&gt;&lt;span class="tlid-trans-verified-button trans-verified-button"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;I would need it at 10ms but for this problem I set it at 2ms&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: the timer is 6 times faster</title><link>https://devzone.nordicsemi.com/thread/247370?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 13:45:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f93a03a9-3208-4252-841c-7dbaf901601d</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Are you sure you are seeing 6 times the speed, and not 8 or 4? The reason I ask is because it sounds like a prescaler setting. Check out the example in SDK\examples\peripheral\timer.&lt;/p&gt;
&lt;p&gt;My guess is that during your porting, you have missed some sdk_config.h definitions or something.&lt;/p&gt;
&lt;p&gt;Try to debug nrf_drv_timer_init() and see if the number of ticks set is correct, and if it is not, why it is not set correctly.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>