<?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>How to turn off completely UART in nRF52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62294/how-to-turn-off-completely-uart-in-nrf52840</link><description>Hello, I’m using nRF52840 with SDK 16 and SD 7. My purpose is to save as much power is possible using high-frequency clock (32MHz) only during periodic duties and BLE activity and low-frequency clock (32KHz crystal) otherwise. I’ve programmed app-timer</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Jun 2020 08:47:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62294/how-to-turn-off-completely-uart-in-nrf52840" /><item><title>RE: How to turn off completely UART in nRF52840</title><link>https://devzone.nordicsemi.com/thread/254395?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2020 08:47:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62dbbd65-9493-4128-8ee8-751fdda12191</guid><dc:creator>Elisa</dc:creator><description>&lt;p&gt;Thank you Einar! It works!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to turn off completely UART in nRF52840</title><link>https://devzone.nordicsemi.com/thread/254146?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2020 06:29:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02fb2cb3-3f7d-4356-b1a7-32ebe386be61</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You could try to toggle the power tot he UARTE peripheral by writing to a hidden register as described in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/42883/current-consumption-when-using-timer-and-scheduler-alongwith-nrf_pwr_mgmt_run/167545#167545"&gt;this post&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to turn off completely UART in nRF52840</title><link>https://devzone.nordicsemi.com/thread/254093?ContentTypeID=1</link><pubDate>Tue, 09 Jun 2020 16:11:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfd049ce-6ff1-48be-9ee1-43e7bed5b17c</guid><dc:creator>Elisa</dc:creator><description>&lt;p style="font-weight:400;"&gt;&lt;span&gt;Thank you Vojislav, but it&amp;rsquo;s not the same case. I don&amp;rsquo;t power on/off the UART in BLE events, but in a similar way in a callback invoked by app-scheduler and the scheduled event is generated by an app-timer periodic callback:&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;/**@brief Periodic handler function to be called by the scheduler. */&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;void periodic_scheduler_event_handler(void *p_event_data, uint16_t event_size)&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char string[] = {&amp;#39;\0&amp;#39;, &amp;#39;\0&amp;#39;, &amp;#39;:&amp;#39;, &amp;#39;\0&amp;#39;};&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrf_gpio_pin_toggle(LED_1);&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;byteToHex(counter, string);&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uart_init();&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app_uart_putstr(string, 4);&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app_uart_close();&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;counter++;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;/**@brief Timeout handler for the repeated timer used for toggling LED 1.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;* @details Print a log line indicating weather executing in thread/main or interrupt mode.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;*/&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;static void timer_handler(void * p_context)&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app_sched_event_put(NULL, 0, periodic_scheduler_event_handler);&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;span&gt;I still need a feedback.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to turn off completely UART in nRF52840</title><link>https://devzone.nordicsemi.com/thread/253693?ContentTypeID=1</link><pubDate>Mon, 08 Jun 2020 08:18:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b5e3d98-a97e-4d54-a827-f418a0a7752a</guid><dc:creator>Vojislav</dc:creator><description>&lt;p&gt;Hi Elisa,&lt;br /&gt;&lt;br /&gt;I had similar problem when working with nrf52811. I was using SDK 15.3 and I was testing this on nRF52840, so it should also work for you.&amp;nbsp;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/58745/uart-disable-problem"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/58745/uart-disable-problem&lt;/a&gt;&lt;br /&gt;Check&amp;nbsp;the verified answer.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Vojislav.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>