<?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 compare event again. (Case ID: 288462  continued)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87575/rtc-compare-event-again-case-id-288462-continued</link><description>Mr Jared, I am sorry. I accidentally pressed the verify button and the ticket(Case ID: 288462) was closed. 
 
 To answer your earlier question. 
 I checked the nrf_drv_rtc_cc_set() error code. It was &amp;#39;0x0000000d&amp;#39;. 
 Can you give us an idea of the solution</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 May 2022 08:55:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87575/rtc-compare-event-again-case-id-288462-continued" /><item><title>RE: RTC compare event again. (Case ID: 288462  continued)</title><link>https://devzone.nordicsemi.com/thread/366636?ContentTypeID=1</link><pubDate>Fri, 06 May 2022 08:55:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97f85d9a-2fa6-4b1c-b5d6-08e87b89bf53</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Great, I&amp;#39;ll mark this case as closed then.&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC compare event again. (Case ID: 288462  continued)</title><link>https://devzone.nordicsemi.com/thread/366558?ContentTypeID=1</link><pubDate>Fri, 06 May 2022 00:41:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:685eac5a-ed53-4436-99a8-13adb2033b32</guid><dc:creator>TML_YT</dc:creator><description>&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;&amp;#39;It seems that the RTC peripheral cannot clear the counter before calling nrf_drv_rtc_cc_set()&amp;#39;.&lt;br /&gt;Indeed, when debugging, it seemed to work fine when the program was run one step at a time.&amp;#39; It might work if you put a delay time between &amp;#39;nrf_drv_rtc_counter_clear( )&amp;#39; and &amp;#39;nrf_drv_rtc_cc_se( )&amp;#39;, but I have not tried that.&lt;/p&gt;
&lt;p&gt;I would like to apply the second solution you suggested.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC compare event again. (Case ID: 288462  continued)</title><link>https://devzone.nordicsemi.com/thread/366393?ContentTypeID=1</link><pubDate>Thu, 05 May 2022 09:05:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16e06b0f-e316-484b-9c60-ed4de19917f4</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry I was reading the wrong error register. The error that you&amp;#39;re getting is indeed&amp;nbsp;&lt;span&gt;NRFX_ERROR_TIMEOUT.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__nrfx__rtc.html#ga527c0dc9807c1801eed001d47cbb1709"&gt;NRFX_ERROR_TIMEOUT&lt;/a&gt;:&lt;em&gt;&amp;nbsp;The compare is not set because the request value is behind the current counter value. This error can only be reported if the reliable mode is enabled.&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It seems like the RTC peripheral isn&amp;#39;t&amp;nbsp;able to clear the counter before you call&amp;nbsp;nrf_drv_rtc_cc_set().&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you use the second solution I provided in the original thread?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jared&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC compare event again. (Case ID: 288462  continued)</title><link>https://devzone.nordicsemi.com/thread/366291?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 14:14:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5b6b1e3-050e-4de2-854b-8cc637915eea</guid><dc:creator>TML_YT</dc:creator><description>&lt;p&gt;Thank you for your prompt reply.&lt;/p&gt;
&lt;p&gt;I read the err_code in debug mode in SEEGER as attached.&lt;br /&gt;I am using the breakpoint &amp;#39;APP_ERROR_CHECK(err_code)&amp;#39; just after nrf_drv_rtc_cc_set() and reading the err_code there.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know any other way to read the err_code other than this way.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x172/__key/communityserver-discussions-components-files/4/20220504_5F00_screenshot.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC compare event again. (Case ID: 288462  continued)</title><link>https://devzone.nordicsemi.com/thread/366263?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 13:33:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70cbdd2a-8748-4538-8e05-bf4c3b260687</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you sure that it returns that?&lt;/p&gt;
&lt;p&gt;The &lt;span&gt;nrf_drv_rtc_cc_set() should either return &lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;NRFX_SUCCESS or&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;NRFX_ERROR_TIMEOUT&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Can you share a screenshot that shows the error code?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>