<?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>nrf_serial_init triggers timing/clock problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59699/nrf_serial_init-triggers-timing-clock-problem</link><description>Hardware: nRF52840 DK 
 SDK: 16.0.0 
 FreeRTOS: 10.0.0 
 I am attempting to use UARTE1 for a Modbus port. UART0 is already in use for a Command Line Interface. I can set up and use UART0 with no issues. However when I call nrf_serial_init to setup UARTE1</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 31 Mar 2020 16:27:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59699/nrf_serial_init-triggers-timing-clock-problem" /><item><title>RE: nrf_serial_init triggers timing/clock problem</title><link>https://devzone.nordicsemi.com/thread/242769?ContentTypeID=1</link><pubDate>Tue, 31 Mar 2020 16:27:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cba8df15-429d-474a-b150-a3fcb02df0bc</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for the update! I did not think of that. I will keep this in mind next time I see someone experiencing similar behavior. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_serial_init triggers timing/clock problem</title><link>https://devzone.nordicsemi.com/thread/242697?ContentTypeID=1</link><pubDate>Tue, 31 Mar 2020 12:36:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:558bc811-693e-4ae1-a796-e9666b4ba4f1</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I think I figured out what was going on. Right before calling nrf_serial_init my UART driver that encapsulates the SDK serial and uart driver code configures a pullup on the rts pin (which is still just a gpio at that point). However in the case of my Modbus port there is no rts pin. So, it is manipulating P0.0 which probably messes up the 32KHz clock. Once I eliminated that nrf_serial_init did not cause any problems.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I missed that yesterday because I was getting pretty punchy at the end of the day.&lt;/p&gt;
&lt;p&gt;BTW: Our FreeRTOS uses RTC1 and tickless idle.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_serial_init triggers timing/clock problem</title><link>https://devzone.nordicsemi.com/thread/242687?ContentTypeID=1</link><pubDate>Tue, 31 Mar 2020 12:07:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0d3d903-f590-4003-be18-23d9deec5a81</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Could it be that RTC2 is being reconfigured while already running? This will cause the RTC to keep running with the previous prescaler setting which may be different. Excerpt from the RTC chapter of the PS:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;quot;The PRESCALER register is read/write when the RTC is stopped. &lt;strong&gt;The PRESCALER register is read-only once the RTC is STARTed&lt;/strong&gt;. Writing to the PRESCALER register when the RTC is started has no effect.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;The PRESCALER is restarted on START, CLEAR and TRIGOVRFLW, that is, &lt;strong&gt;the prescaler value is latched to an internal register (&amp;lt;&amp;lt;PRESC&amp;gt;&amp;gt;) on these tasks&lt;/strong&gt;.&amp;quot; &lt;span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/rtc.html?cp=4_0_0_5_21"&gt;RTC — Real-time counter&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Also, does Freertos use RTC1 or RTC2 in your case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>