<?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>RTC with PPI, interrupts stops after two events</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118685/rtc-with-ppi-interrupts-stops-after-two-events</link><description>Hi, 
 I&amp;#39;m trying to use RTC to generate interrupts at every second. The rtc event handler is below: 
 
 In the RTC examples, nrfx_rtc_counter_clear is used to reset the RTC count; therefore, the interrupt event continues. Since my intention is to use</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Feb 2025 12:13:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118685/rtc-with-ppi-interrupts-stops-after-two-events" /><item><title>RE: RTC with PPI, interrupts stops after two events</title><link>https://devzone.nordicsemi.com/thread/521916?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 12:13:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba3cf89f-25a3-4014-8061-4c8d9309c89e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;The zephyr&amp;nbsp;&lt;span&gt;kernel timer uses RTC. Set it up to get trigger callback every 1 second, and start the sampling in the callback.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with PPI, interrupts stops after two events</title><link>https://devzone.nordicsemi.com/thread/521845?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 02:41:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b584eee6-06f1-493a-8d15-80c19afead40</guid><dc:creator>Ros</dc:creator><description>[quote userid="15146" url="~/f/nordic-q-a/118685/rtc-with-ppi-interrupts-stops-after-two-events/521832"]I would recommend using a kernel timer for this instead.[/quote]
&lt;p&gt;This is a low-power application, so I wish not wake-up cpu before ADC sampling completes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with PPI, interrupts stops after two events</title><link>https://devzone.nordicsemi.com/thread/521832?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2025 23:51:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f9c7a51-0141-415e-8de3-ccfdd570a965</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I would recommend using a kernel timer for this instead.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/kernel/services/timing/timers.html#using-a-timer-expiry-function"&gt;https://docs.zephyrproject.org/latest/kernel/services/timing/timers.html#using-a-timer-expiry-function&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void my_work_handler(struct k_work *work)
{
    /* do the processing that needs to be done periodically */
    ...
}

K_WORK_DEFINE(my_work, my_work_handler);

void my_timer_handler(struct k_timer *dummy)
{
    k_work_submit(&amp;amp;my_work);
}

K_TIMER_DEFINE(my_timer, my_timer_handler, NULL);

...

/* start a periodic timer that expires once every second */
k_timer_start(&amp;amp;my_timer, K_SECONDS(1), K_SECONDS(1));&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with PPI, interrupts stops after two events</title><link>https://devzone.nordicsemi.com/thread/521814?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2025 20:24:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de7baa5f-b8a7-4e37-ae5f-767ffdade8a6</guid><dc:creator>Ros</dc:creator><description>&lt;p&gt;I&amp;#39;m using nRF52840.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with PPI, interrupts stops after two events</title><link>https://devzone.nordicsemi.com/thread/521797?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2025 16:52:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e858836-900f-462d-b559-f73688ec8350</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
[quote userid="85556" url="~/f/nordic-q-a/118685/rtc-with-ppi-interrupts-stops-after-two-events"]Since my intention is to use this to trigger an ADC at 1 Hz[/quote]
&lt;p&gt;What chip are you using? I see you have a nRF52820 tag, but the nRF52820 does not have ADC.&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://docs.nordicsemi.com/bundle/struct_nrf52/page/struct/nrf52.html"&gt;https://docs.nordicsemi.com/bundle/struct_nrf52/page/struct/nrf52.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>