<?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>Using High Resolution Oscillator for zephyr timer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112352/using-high-resolution-oscillator-for-zephyr-timer</link><description>Dear Nordic Team, 
 I had questions concerning the use of the High resolution oscillator 
 
 Question 1 : 
 Could you provide the detailed step needed to enable the HFXO ? 
 Some previous ticket mentioned that “ NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;” should</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Jun 2024 14:12:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112352/using-high-resolution-oscillator-for-zephyr-timer" /><item><title>RE: Using High Resolution Oscillator for zephyr timer</title><link>https://devzone.nordicsemi.com/thread/490914?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2024 14:12:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66fe7ce6-c444-46b2-9a56-359a24675ff4</guid><dc:creator>Gregoire_</dc:creator><description>&lt;p&gt;Good Afternoon, thanks for your response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For our project we would need to generate a pulse of around 8/10us every time a specific condition is true in our code, so several pulses. (but there would be at least 1ms between each pulse generation due to our thread&amp;nbsp;&lt;a id="dictEntry10000722926" class="dictLink featured"&gt;&lt;/a&gt;scheduling)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Gregoire&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using High Resolution Oscillator for zephyr timer</title><link>https://devzone.nordicsemi.com/thread/490911?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2024 14:06:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50fbd3fe-2051-4851-9abc-410f5b977cd1</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;This would need to use GPIOTE+TIMER+PPI, do you need only 1 pulse or several?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using High Resolution Oscillator for zephyr timer</title><link>https://devzone.nordicsemi.com/thread/490826?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2024 09:45:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05392d13-4a38-4dac-bc9a-e20b8a0d2576</guid><dc:creator>Gregoire_</dc:creator><description>&lt;p&gt;Good Morning,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks again for the help. I have tested the exemple code using nrfx timers. It work great and I am able to&amp;nbsp;generate delays of the order of 10 us. Our problem is that when it comes to toggling a pin using those nrfx timer in a bigger application , the duration are not right.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is there a simple way in zephyr to just generate standalone very short impulse on a gpio, in the order of 10us ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the case we would want to even shorter impulse (like 2/3 us) , is it also possible or are there some harware or processing time limitation that make that impossible ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Gregoire&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using High Resolution Oscillator for zephyr timer</title><link>https://devzone.nordicsemi.com/thread/490326?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 13:52:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:216a4de6-be8c-4184-a07b-4f09a797ecb4</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/104587/use-hardware-timer-in-zephyr/450362"&gt;This post&lt;/a&gt; might help.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using High Resolution Oscillator for zephyr timer</title><link>https://devzone.nordicsemi.com/thread/490166?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 08:18:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25abebb0-90a4-47e7-bfee-9d24ced518cf</guid><dc:creator>Gregoire_</dc:creator><description>&lt;p&gt;Good Morning,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your response. Enabling the HFXO with the clock subsys seems to work. However, even with the HFXO enabled, I am not able to generate timer durations under 100 &amp;micro;s.&lt;/p&gt;
&lt;p&gt;For example, when using a periodic timer of 50 &amp;micro;s with &lt;code&gt;k_timer_start(&amp;amp;my_status_timer, K_USEC(0), K_USEC(50));&lt;/code&gt;, the duration of 50 &amp;micro;s is not observed (we monitor a pin toggle with an oscilloscope to test this). We always have a minimum duration of around 120 &amp;micro;s.&lt;/p&gt;
&lt;p&gt;I know that the Zephyr documentation states:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;Note that the timer&amp;rsquo;s duration and period parameters specify &lt;strong&gt;minimum&lt;/strong&gt; delays that will elapse. Because of internal system timer precision (and potentially runtime interactions like interrupt delay) it is possible that more time may have passed as measured by reads from the relevant system time APIs. But at least this much time is guaranteed to have elapsed.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Does this mean that we can&amp;#39;t generate delays smaller than 100 &amp;micro;s using Zephyr timers?&lt;/p&gt;
&lt;p&gt;How should we proceed if we want to generate very short duration timers (in the order of 10 &amp;micro;s)?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;
&lt;p&gt;Gregoire&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using High Resolution Oscillator for zephyr timer</title><link>https://devzone.nordicsemi.com/thread/490013?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2024 14:36:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3b06a40-5e5b-4e68-82e7-a5229d336c12</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to start the HFCLK, the simplest form is NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART=1;, then wait and clear the EVENTS_HFCLKSTARTED event. , but I would suggest to use the clock subsys.&amp;nbsp;See &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/108102/selecting-hfclk-as-clock-source-for-hardware-timer-when-using-zephyr/467859"&gt;this post&lt;/a&gt;&amp;nbsp;to on how to enable &lt;span&gt;HFXO as the timer&lt;/span&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>