<?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>Clock skew under temperature for UART and PWM</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115852/clock-skew-under-temperature-for-uart-and-pwm</link><description>I am using an nrf52833 with both 32.768 kHz and 32MHz external crystals (identical to the DK). When I go down to -30 deg C, the uart stops working. I believe that this is due to frame errors having to do with clock skew. Interesting enough, when I plug</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Dec 2024 14:03:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115852/clock-skew-under-temperature-for-uart-and-pwm" /><item><title>RE: Clock skew under temperature for UART and PWM</title><link>https://devzone.nordicsemi.com/thread/514910?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2024 14:03:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06cf0b01-6772-4584-a37c-b76f99053b8e</guid><dc:creator>eb12345</dc:creator><description>&lt;p&gt;Thank you for helping with the troubleshooting steps and register definitions. Turns out the HF crystal in this last batch/build was installed incorrectly. When I tried to request the HFCLK, it was failing, which caused the 1mA additional current. Once I fixed the crystal issue, the current comes back to 30uA.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock skew under temperature for UART and PWM</title><link>https://devzone.nordicsemi.com/thread/514044?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2024 13:52:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34b34756-77f3-4476-a98a-ac5d01f55fa1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I think the discrepancy is too big to caused by the clock source. Do you have a 52833 DK you can test this on for comparison? The System run current in idle and UARTE enable should not exceed 1 mA regardless of whether you are using HFINT or HFXO.&lt;/p&gt;
&lt;p&gt;Another thing you can to do troubleshoot this is to read out the following registers with the debugger:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52833/page/clock.html#ariaid-title27"&gt;HFCLKSTAT&lt;/a&gt;&amp;nbsp;- check if xtal is enabled&lt;/li&gt;
&lt;li&gt;UARTE.&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52833/page/uarte.html#ariaid-title32"&gt;ENABLE&lt;/a&gt;&amp;nbsp;- check if UARTE instance is enabled&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock skew under temperature for UART and PWM</title><link>https://devzone.nordicsemi.com/thread/513907?ContentTypeID=1</link><pubDate>Sat, 07 Dec 2024 01:52:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bffd1c5-7b01-4a2a-84fa-80fc1e700430</guid><dc:creator>eb12345</dc:creator><description>&lt;p&gt;The difference is about 1.5mA. Same code without ever requesting the HFXO and releasing it is&amp;nbsp;30uA. Interesting enough, the same thing happens if I plug in the USB and then unplug it. Something is not releasing the HFXO, or is being turned on in the process.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock skew under temperature for UART and PWM</title><link>https://devzone.nordicsemi.com/thread/513796?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2024 10:04:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9539fff-c01e-441f-802b-259a8bcbb460</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;What sleep current do you measure with this implementation? If the HFXO is left running but not sourced to any peripheral, the idle current should be around 200 µA. However, if the HF clock is requested by a peripheral such as UART, TIMER, etc., it will exceed 500 µA.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock skew under temperature for UART and PWM</title><link>https://devzone.nordicsemi.com/thread/513743?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2024 03:12:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a802c8d6-a126-4499-865e-b10faa03ffd7</guid><dc:creator>eb12345</dc:creator><description>&lt;p&gt;That example worked in turning on the HFCLK. I am able to use the UART all the way down to -40 deg C. For some reason, even though I release the HFCLK like your example, the current consumption does not go back down into the uA like expected. If I don&amp;#39;t request and release the HFCLK (code I had before starting this thread), then the sleep currents are ok. My assumption is that something is holding the HFCLK (not the UART since I&amp;#39;m suspending it). Is there a way to check what is holding the HFCLK from being disabled ? Did you ever notice this behavour ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock skew under temperature for UART and PWM</title><link>https://devzone.nordicsemi.com/thread/508614?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2024 08:16:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dc8eaf8-edd9-4006-b4d2-4addfb722b8f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The HF peripheral clocks are sourced from either HFINT or HFXO, depending on which one is active. Therefore, the UART driver should not force the HFXO off, as it may be required by other modules such as the Bluetooth stack (HFXO must be active when using the RADIO). Instead, it should release its request for the high accuracy clock source via the onoff API. This is what I did in the sample posted here:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/112115/suspending-uart-async-using-pm_device-action_suspend-causes-crash/489916"&gt;RE: Suspending UART Async using PM_DEVICE ACTION_SUSPEND causes crash.&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock skew under temperature for UART and PWM</title><link>https://devzone.nordicsemi.com/thread/508605?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2024 05:59:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07cf0d23-fb60-4883-a303-9c3ce1d146d9</guid><dc:creator>eb12345</dc:creator><description>&lt;p&gt;Is there a way to specify the clock that the UART uses, that way when I disable the uart (when not in use), it automatically disables the HF clock ? I assume that the internal clocks are lower power than the external clocks ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock skew under temperature for UART and PWM</title><link>https://devzone.nordicsemi.com/thread/508292?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2024 08:07:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b549ddea-8d3e-49af-8d3d-21b7675745c8</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The crystal oscillator&amp;nbsp;can be&amp;nbsp;requested&amp;nbsp;with this function:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/6acdd63eb1c31331deb92f2982a279afe6d68f5a/samples/peripheral/radio_test/src/main.c#L32"&gt;https://github.com/nrfconnect/sdk-nrf/blob/6acdd63eb1c31331deb92f2982a279afe6d68f5a/samples/peripheral/radio_test/src/main.c#L32&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock skew under temperature for UART and PWM</title><link>https://devzone.nordicsemi.com/thread/508269?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2024 04:28:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:073213be-545b-4270-bef2-449f747dcff6</guid><dc:creator>eb12345</dc:creator><description>&lt;p&gt;All the defaults were kept, so it sounds like the internal 32MHz clock is being used. How do I enable the HFCLK using the external crystal ? Is there documentation or example on how to do it on ncs ?&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock skew under temperature for UART and PWM</title><link>https://devzone.nordicsemi.com/thread/508135?ContentTypeID=1</link><pubDate>Mon, 28 Oct 2024 12:12:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdbb54b5-fb86-40b8-a390-cbd20072e7a0</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The HFXO clock should be enabled when UART RX is enabled. I&amp;nbsp;uploaded an example in this post&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/112115/suspending-uart-async-using-pm_device-action_suspend-causes-crash"&gt;Suspending UART Async using PM_DEVICE ACTION_SUSPEND causes crash.&lt;/a&gt;&amp;nbsp;showing how&amp;nbsp;one can request and release the HFXO source via the onoff API in the nRF Connect SDK.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1730117508306v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Ref.&amp;nbsp;&lt;a id="" href="https://docs.nordicsemi.com/bundle/ps_nrf52833/page/uarte.html"&gt;https://docs.nordicsemi.com/bundle/ps_nrf52833/page/uarte.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock skew under temperature for UART and PWM</title><link>https://devzone.nordicsemi.com/thread/508019?ContentTypeID=1</link><pubDate>Sat, 26 Oct 2024 15:35:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c371ee3b-1210-4f1d-a9bb-a554248b8fe6</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;The 32MHz crystal is quite good at low temperatures but the internal 32MHz clock is affected heavily by both temperature and VDD; VDD is propped up by the USB when it is low due to low battery temperature, and that can correct some of the error in the internal 32MHz clock. Given no mention is made of the UART and PWM clock, note that&amp;nbsp;&lt;span&gt;the UART and PWM clock&lt;/span&gt; default to the sloppy internal 32MHz clock and not the external 32MHz crystal. Try enabling HFCLK using the external crystal and the issues should go away.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>