<?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>&amp;#39;POWER_CLOCK_IRQHandler&amp;#39; gets called after ~100seconds under unknown circumstances (causes the product to freeze)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79488/power_clock_irqhandler-gets-called-after-100seconds-under-unknown-circumstances-causes-the-product-to-freeze</link><description>Hi, 
 
 We have a product already on the market for about 2 years, based on nrf52840 and nrf52832. 
 The product receives data from an &amp;#39;external device&amp;#39; via UARTE, forwards the data to a washing machine via UARTE, get response from the machine, sends</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Sep 2021 11:58:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79488/power_clock_irqhandler-gets-called-after-100seconds-under-unknown-circumstances-causes-the-product-to-freeze" /><item><title>RE: 'POWER_CLOCK_IRQHandler' gets called after ~100seconds under unknown circumstances (causes the product to freeze)</title><link>https://devzone.nordicsemi.com/thread/330835?ContentTypeID=1</link><pubDate>Thu, 23 Sep 2021 11:58:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bc20f86-6758-4ccf-98ed-8a318ef10e56</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/koniho0"&gt;koniho&lt;/a&gt;, I don&amp;#39;t know what&amp;#39;s causing this strange behaviour for OP, all I know is that it appears to be related to the LFXO. I suggest you create a new ticket if you are experiencing a similiar issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 'POWER_CLOCK_IRQHandler' gets called after ~100seconds under unknown circumstances (causes the product to freeze)</title><link>https://devzone.nordicsemi.com/thread/330723?ContentTypeID=1</link><pubDate>Wed, 22 Sep 2021 18:59:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82e23ba6-5793-4ba2-8347-c759e781a7cf</guid><dc:creator>koniho</dc:creator><description>&lt;p&gt;Is it possible that this condition could occur with the softdevice enabled (using HFCLK and external LFCLK)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 'POWER_CLOCK_IRQHandler' gets called after ~100seconds under unknown circumstances (causes the product to freeze)</title><link>https://devzone.nordicsemi.com/thread/329322?ContentTypeID=1</link><pubDate>Tue, 14 Sep 2021 07:11:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b84150ae-2819-4015-a1c0-b013026551ec</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Glad to hear that it worked. But please note that the Synthesized clock source is generally not recommend because it may increase the idle current (it forces the HF clock to always be on like UART does).&lt;/p&gt;
&lt;p&gt;I&amp;#39;m still not sure why the LFXO is behaving strangely. Have you changed load caps or the 32K crystal recently? &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 'POWER_CLOCK_IRQHandler' gets called after ~100seconds under unknown circumstances (causes the product to freeze)</title><link>https://devzone.nordicsemi.com/thread/329258?ContentTypeID=1</link><pubDate>Mon, 13 Sep 2021 13:48:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15d20a42-f790-49f6-b7b4-3eba564169d0</guid><dc:creator>Mircea Coman</dc:creator><description>&lt;p&gt;Vidar, it worked! Changing Clock source to Synth caused the &amp;#39;&lt;strong&gt;POWER_CLOCK_IRQHandler&amp;#39;&amp;nbsp;&lt;/strong&gt;to be always called right after device started and the CLOCK did not stop since (wirking as expected).&lt;br /&gt;&lt;br /&gt;What I also discovered is that if I enable the SoftDevice by default, the CLOCK also doesn&amp;#39;t stop, even if I leave the Clock source to &amp;#39;1&amp;#39; in &amp;#39;&lt;span&gt;sdk_config.h&amp;#39;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Thank you!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 'POWER_CLOCK_IRQHandler' gets called after ~100seconds under unknown circumstances (causes the product to freeze)</title><link>https://devzone.nordicsemi.com/thread/329074?ContentTypeID=1</link><pubDate>Fri, 10 Sep 2021 15:35:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e224f9eb-e9f7-4b2b-9c61-41e5369d1c39</guid><dc:creator>Vidar Berg</dc:creator><description>[quote userid="107254" url="~/f/nordic-q-a/79488/power_clock_irqhandler-gets-called-after-100seconds-under-unknown-circumstances-causes-the-product-to-freeze/329073#329073"]What are the conditions under which CLOCK can be stopped intarnally?[/quote]
&lt;p&gt;That should never happen. The application should be in complete control of when the LFCLK is on or off. And most applications tend to keep it always on. &lt;/p&gt;
[quote userid="107254" url="~/f/nordic-q-a/79488/power_clock_irqhandler-gets-called-after-100seconds-under-unknown-circumstances-causes-the-product-to-freeze/329072#329072"]I tried running the code on an development board (instead of the production board) and &amp;#39;&lt;strong&gt;POWER_CLOCK_IRQHandler&amp;#39;&amp;nbsp;&lt;/strong&gt;is called right at the beginning of device execution...[/quote]
&lt;p&gt;Interesting.. So what clock source are you using on your board? Have you tried with a different source? E.g. sdk_config.h::CLOCK_CONFIG_LF_SRC 2 /*Synth */&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 'POWER_CLOCK_IRQHandler' gets called after ~100seconds under unknown circumstances (causes the product to freeze)</title><link>https://devzone.nordicsemi.com/thread/329073?ContentTypeID=1</link><pubDate>Fri, 10 Sep 2021 15:26:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f18cda71-0b94-4afa-80cc-25256cdb68f9</guid><dc:creator>Mircea Coman</dc:creator><description>&lt;p&gt;What are the conditions under which CLOCK can be stopped intarnally? Is it even possible that the RTC counter is not incredemented anymore, timer callback not called and still, &amp;#39;nrf_drv_clock_lfclk_is_running()&amp;#39; returns true ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 'POWER_CLOCK_IRQHandler' gets called after ~100seconds under unknown circumstances (causes the product to freeze)</title><link>https://devzone.nordicsemi.com/thread/329072?ContentTypeID=1</link><pubDate>Fri, 10 Sep 2021 15:05:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b23b5372-5583-455b-b6f2-eea45b1fba67</guid><dc:creator>Mircea Coman</dc:creator><description>&lt;p&gt;VIdar, thank you for your answers.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. 3.&lt;/strong&gt; Strangely, the event received in &lt;strong&gt;POWER_CLOCK_IRQHandler&amp;nbsp;&lt;/strong&gt;is &amp;#39;NRF_CLOCK_EVENT_LFCLKSTARTED&amp;#39; , which, by reading the code in &amp;#39;nrf_drv_clock.c&amp;#39; it should start the LFCLK, instead of stopping it. This is 140 seconds after the device started, and all the while Timer Interrupt was called correctly.&lt;/p&gt;
&lt;p&gt;After the call to &amp;#39;&lt;strong&gt;POWER_CLOCK_IRQHandler&amp;#39;,&amp;nbsp;&lt;/strong&gt;the timer callback is not called anymore and &amp;#39;NRF_RTC1-&amp;gt;COUNTER&amp;#39; is no more incremented.&lt;/p&gt;
&lt;p&gt;I enabled LOGGING in CLOCK, UART, GPIO but there&amp;#39;s no message indicating what is happening.&lt;/p&gt;
&lt;p&gt;My recent assumption was that the device was entering low power mode, and I tried setting the mode to &amp;#39;Constant Latency Mode&amp;#39; by caling &amp;#39;&lt;em&gt;nrf_power_task_trigger(NRF_POWER_TASK_CONSTLAT)&lt;/em&gt;;&amp;#39;. Did not help.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. The values for POWER and CLOCK (at startup, read in main()):&lt;/p&gt;
&lt;p&gt;- NRF_&lt;span&gt;POWER-&amp;gt;&lt;/span&gt;&lt;span class="item"&gt;&lt;a title="INTENSET" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/power.html?cp=4_0_0_4_2_6_8#register.INTENSET"&gt;INTENSET&lt;/a&gt;&amp;nbsp;== 2 (?);&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="item"&gt;- NRF_CLOCK-&amp;gt;INTENSET == 2 (&lt;span&gt;LFCLKSTARTED?&lt;/span&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="item"&gt;In &amp;#39;&lt;strong&gt;POWER_CLOCK_IRQHandler&amp;#39;&amp;nbsp; &lt;/strong&gt;the values of the 2 registers is zero.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BTW, The clock is initialized in main() by calling &amp;#39;nrf_drv_clock_init()&amp;#39;&lt;/p&gt;
&lt;p&gt;I tried running the code on an development board (instead of the production board) and &amp;#39;&lt;strong&gt;POWER_CLOCK_IRQHandler&amp;#39;&amp;nbsp;&lt;/strong&gt;is called right at the beginning of device execution...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Ideas?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 'POWER_CLOCK_IRQHandler' gets called after ~100seconds under unknown circumstances (causes the product to freeze)</title><link>https://devzone.nordicsemi.com/thread/329047?ContentTypeID=1</link><pubDate>Fri, 10 Sep 2021 13:21:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d05c021c-2117-480d-b4d7-f7380e860b5c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I see, thanks for confirming. It&amp;#39;s hard for me to say what causes &lt;strong&gt;POWER_CLOCK_IRQn&lt;/strong&gt; to be raised and whether it should be expected or not as the trigger source can be any interrupt enabled event in POWER or CLOCK.&lt;/p&gt;
&lt;p&gt;Some more follow up questions:&lt;/p&gt;
&lt;p&gt;1. Is the problem caused by the program not returning from &lt;strong&gt;POWER_CLOCK_IRQHandler&lt;/strong&gt;(), or does it return, but without the LF clock running?&lt;/p&gt;
&lt;p&gt;2. Which interrupts do you have enabled in POWER-&amp;gt;&lt;span class="item"&gt;&lt;a title="INTENSET" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/power.html?cp=4_0_0_4_2_6_8#register.INTENSET"&gt;INTENSET&lt;/a&gt;&lt;/span&gt; and CLOCK-&amp;gt;&lt;span class="item"&gt;&lt;a title="INTENSET" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/clock.html?cp=4_0_0_4_3_2_13#register.INTENSET"&gt;INTENSET&lt;/a&gt;&lt;/span&gt;? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;3. Can you read which event signal have been set when you are in the &lt;strong&gt;POWER_CLOCK_IRQHandler&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 'POWER_CLOCK_IRQHandler' gets called after ~100seconds under unknown circumstances (causes the product to freeze)</title><link>https://devzone.nordicsemi.com/thread/329010?ContentTypeID=1</link><pubDate>Fri, 10 Sep 2021 11:18:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:450c88db-8007-441a-b333-e88bef551f0c</guid><dc:creator>Mircea Coman</dc:creator><description>&lt;p&gt;We use SEGGER | SDK 12.3.0 |&amp;nbsp;SoftDevice is disabled |&amp;nbsp;WDT is disabled&lt;/p&gt;
&lt;p&gt;The bug is reproducible&amp;nbsp;even if SD + WDT are enabled (as they are in the production). This bug went unnoticed for years while tousands of devices were / are running in the field.&lt;br /&gt;&lt;br /&gt;Could you tell me why &amp;#39;&lt;strong&gt;POWER_CLOCK_IRQHandler&amp;#39;&amp;nbsp;&lt;/strong&gt;is called? Looks like device enters power saving mode for some (unknown) reason?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 'POWER_CLOCK_IRQHandler' gets called after ~100seconds under unknown circumstances (causes the product to freeze)</title><link>https://devzone.nordicsemi.com/thread/329004?ContentTypeID=1</link><pubDate>Fri, 10 Sep 2021 11:11:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10c31487-0d7f-409f-85c6-ae26aa76caa4</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Are you enabling the watchdog timer in your application, and in that case, is there a chance that you may have experienced a WD reset? If so, please check if you may be impacted by this bug mentioned here:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1631272219615v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/65422/what-are-sdk-17-x-0-known-issues"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/65422/what-are-sdk-17-x-0-known-issues&lt;/a&gt; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 'POWER_CLOCK_IRQHandler' gets called after ~100seconds under unknown circumstances (causes the product to freeze)</title><link>https://devzone.nordicsemi.com/thread/328883?ContentTypeID=1</link><pubDate>Thu, 09 Sep 2021 16:17:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1abe807-1f00-42f8-9fde-8a95e44bb067</guid><dc:creator>Mircea Coman</dc:creator><description>&lt;p&gt;Our issue seems to be similar to :&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/68666/app-timer-stops-working---need-a-power-cycle-to-fix-issue"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/68666/app-timer-stops-working---need-a-power-cycle-to-fix-issue&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I reached the author of the above ticket and he did not found the cause so far.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>