<?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>timers in nrf5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74636/timers-in-nrf5340</link><description>Hello, 
 
 1) In nrf5340 app CPU, there are only 3 timer I can use, timer0, timer1 and time2, is it right? 
 2) I want to use four timers in my project, to control two SPI. now I only have 3 timers, what can I do to get the fourth timer? Do I need to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 May 2021 08:07:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74636/timers-in-nrf5340" /><item><title>RE: timers in nrf5340</title><link>https://devzone.nordicsemi.com/thread/308880?ContentTypeID=1</link><pubDate>Mon, 10 May 2021 08:07:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ae5697f-1254-411b-abce-e3423596045c</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi Carl,&lt;/p&gt;
[quote user="Carl Sun"]&lt;p&gt;&lt;span&gt;Can the timer from Zephyr be 20&amp;nbsp;µs?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&amp;nbsp;No, the Zephyr kernel timer uses the RTC peripheral(32.768 kHz clock), so you get&amp;nbsp;~30 us&amp;nbsp;&lt;span&gt;resolution, and it&amp;#39;s not possible to use (D)PPI with it. So TIMER seems to fit your use-case better.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Note that with the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/timer.html"&gt;TIMER&lt;/a&gt;, you have 6 capture compare channels, so you might not need to use all TIMERS instances. e.g. use TIMER1 CC[0] for one SPI, and TIMER1 CC[1] for the other SPI. But if that is not possible for your use-case, and you need an additional TIMER, then yes, it looks to be possible to get the network core TIMER to generate events to the application core, by using the&amp;nbsp;&lt;span&gt;interprocessor communication (IPC) peripheral. See figure 3&amp;nbsp;at &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf5340%2Fipc.html&amp;amp;anchor=unique_1082314473"&gt;this link&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timers in nrf5340</title><link>https://devzone.nordicsemi.com/thread/308865?ContentTypeID=1</link><pubDate>Mon, 10 May 2021 06:38:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91d17213-0381-49f4-b327-46f31bd2e849</guid><dc:creator>Carl Sun</dc:creator><description>&lt;p&gt;&lt;span&gt;Yes, I want to generate&amp;nbsp;an event every 20 &amp;micro;s using the TIMER, in order to control the SPI. We need the frequency to be extremely&amp;nbsp;fast. It works with the three TIMERs(together&amp;nbsp;with&amp;nbsp;DPPI)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can the timer from Zephyr be 20&amp;nbsp;&amp;micro;s?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timers in nrf5340</title><link>https://devzone.nordicsemi.com/thread/308634?ContentTypeID=1</link><pubDate>Fri, 07 May 2021 02:42:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ffefd54-65fd-4a79-9afe-8efa836f47c8</guid><dc:creator>Carl Sun</dc:creator><description>&lt;p&gt;Every 20&amp;nbsp;&lt;span&gt;&amp;micro;s I need to send a command through two SPI to DAC, so I need four timers which duration are 20&amp;micro;s(each SPI need two timers), it works with the three times and DPPI. Can the duration of the timer from&amp;nbsp;Zephyr kernel be 20&amp;nbsp;&amp;micro;s? If not, can I get the fourth timer with the 20&amp;nbsp;&amp;micro;s duration?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Carl&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timers in nrf5340</title><link>https://devzone.nordicsemi.com/thread/308511?ContentTypeID=1</link><pubDate>Thu, 06 May 2021 10:44:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba62f5d1-3784-4460-b980-ec002d72deac</guid><dc:creator>Sigurd</dc:creator><description>[quote user="Carl Sun"]Can I use the Zephyr kernel timer with DPPI?&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;No, I don&amp;#39;t think that is possible.&lt;/p&gt;
[quote user=""] want to use four timers in my project, to control two SPI[/quote][quote user="Carl Sun"]I need a timer which minimum duration is 20&amp;nbsp;μs[/quote]
&lt;p&gt;So you are generating an event every 20 µs using the TIMER, in order to control the SPI? Could you explain this some more? I don&amp;#39;t understand why this is needed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timers in nrf5340</title><link>https://devzone.nordicsemi.com/thread/308424?ContentTypeID=1</link><pubDate>Thu, 06 May 2021 02:38:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b715a367-4422-46a8-8f95-264a7e2510f0</guid><dc:creator>Carl Sun</dc:creator><description>&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Can I use the Zephyr kernel timer with DPPI?&amp;nbsp; For &lt;span&gt;my application, I need a timer which minimum duration is 20&amp;nbsp;&amp;mu;s. It is OK if I use the three nRF5340 timers with DPPI;&lt;/span&gt;&lt;span&gt;&amp;nbsp;Is it possible if I use Zephyr kernel timer?&lt;/span&gt;&lt;/p&gt;
&lt;div class="content full threaded-reply-content user-defined-markup"&gt;
&lt;div class="content"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks a lot.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Carl Sun&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timers in nrf5340</title><link>https://devzone.nordicsemi.com/thread/307849?ContentTypeID=1</link><pubDate>Mon, 03 May 2021 08:41:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77f36205-f28d-4d38-a480-51d9171ee244</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1) Correct.&lt;/p&gt;
&lt;p&gt;2) Use the Zephyr kernel timer. See &lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/zephyr/reference/kernel/timing/timers.html"&gt;this link&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>