<?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>ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81736/ncs1-61-peripheral_uart-enable-uart-when-connected-and-disable-uart-when-disconnected</link><description>Hi, 
 I work with win10 laptop, Toolchain nrf Connect SDK 1.6.1 on a nrf5340dk. 
 On peripheral_uart sample, I would like to enable uart when a device is connected and I want to disable uart when device is disconnected to reduce consumption. 
 There is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Nov 2021 18:40:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81736/ncs1-61-peripheral_uart-enable-uart-when-connected-and-disable-uart-when-disconnected" /><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339886?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 18:40:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21290695-4dcb-4da9-8aa7-f7c1333187fa</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Robert,&lt;/p&gt;
&lt;p&gt;That&amp;#39;s nice to hear. Both of the issues (Advertising and off and on UART during Runtime) are solved.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339857?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 14:45:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:186099ff-713d-4123-92b7-15646860368c</guid><dc:creator>RHeine</dc:creator><description>&lt;p&gt;Hi Kazi,&lt;/p&gt;
&lt;p&gt;I found the error, I wrote &amp;quot;pm_device_state_set(uart, &lt;strong&gt;PM_STATE_ACTIVE&lt;/strong&gt;, NULL, NULL);&amp;quot; &lt;/p&gt;
&lt;p&gt;instead of &amp;quot;pm_device_state_set(uart, &lt;strong&gt;PM_DEVICE_STATE_ACTIVE&lt;/strong&gt;, NULL, NULL);&amp;quot;&lt;/p&gt;
&lt;p&gt;Now it&amp;#39;s working.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Rob.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339804?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 11:08:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65dfa9cb-4f20-4370-b159-cf44753c904a</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Internet connection was going online and offline simultaneously. It shows my replies did not send so I pressed reply 2 times. and you got the 2 same replies.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339801?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 10:48:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a15c6901-4426-4e15-b4ba-0008ef50a23b</guid><dc:creator>RHeine</dc:creator><description>&lt;p&gt;Why do you send me the same answer ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339799?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 10:44:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3dd76e0a-4194-40c7-ab27-859f201583d3</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Robert,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can use the low-power UART driver implementation if you want to wake up on UART and keep the current consumption low.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The protocol used by this driver implements two control lines ( the Request line (REQ) and the ready line (RDY) to allow disable the UART during the idle period&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/drivers/uart_nrf_sw_lpuart.html"&gt;Low power UART driver — nRF Connect SDK 1.7.99 documentation (nordicsemi.com)&lt;/a&gt;. So it requires extra flow control pins on the UART besides Rx-pin and Tx-pin. So, the device tree should look like this&lt;/p&gt;
&lt;p&gt;&amp;amp;uart1{&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;compatible = &amp;quot;nordic, nrf-urate&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;status = &amp;quot;okay&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rx-pin =&amp;lt;44&amp;gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tx-pin = &amp;lt;45&amp;gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;baudrate =&amp;lt;1000000&amp;gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;lpuart: nrf-sw-lpuart {&amp;nbsp; &amp;nbsp;// this part is the child node of the UART instance that extends standard UART configuration with the control lines REQ and RDY&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;compatible = &amp;quot;nordic, nrf-sw-lpuart&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;status = &amp;quot;okay&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;label&amp;nbsp; &amp;nbsp;= &amp;quot;LPUART&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req-pin =&amp;lt;46&amp;gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rdy-pin = &amp;lt;47&amp;gt;;&lt;/p&gt;
&lt;p&gt;};&lt;/p&gt;
&lt;p&gt;};&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Apart from this, here is a sample of turning off and on the UART during run-time: &lt;a title="https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/boards/nrf/system_off" href="https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/boards/nrf/system_off" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/boards/nrf/system_off&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339798?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 10:41:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3535231-182f-44af-ac8c-c7ea8151c2ca</guid><dc:creator>RHeine</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t want to use the LPUART, I need flow control. I allready base my application on peripheral_uart.&lt;/p&gt;
&lt;p&gt;I just want to use peripheral_uart with the low consumption during advertising, it&amp;#39;s why I want to disable uart&amp;nbsp; during advertising (disconnect) and enable uart when the device is connected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339797?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 10:34:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d82e0696-0c57-4426-99d1-ad3f86cf4b2a</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Robert,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can use the low-power UART driver implementation if you want to wake up on UART and keep the current consumption low.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The protocol used by this driver implements two control lines ( the Request line (REQ) and the ready line (RDY) to allow disable the UART during the idle period&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/drivers/uart_nrf_sw_lpuart.html"&gt;Low power UART driver — nRF Connect SDK 1.7.99 documentation (nordicsemi.com)&lt;/a&gt;. So it requires extra flow control pins on the UART besides Rx-pin and Tx-pin. So, the device tree should look like this&lt;/p&gt;
&lt;p&gt;&amp;amp;uart1{&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;compatible = &amp;quot;nordic, nrf-urate&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;status = &amp;quot;okay&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rx-pin =&amp;lt;44&amp;gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tx-pin = &amp;lt;45&amp;gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;baudrate =&amp;lt;1000000&amp;gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;lpuart: nrf-sw-lpuart {&amp;nbsp; &amp;nbsp;// this part is the child node of the UART instance that extends standard UART configuration with the control lines REQ and RDY&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;compatible = &amp;quot;nordic, nrf-sw-lpuart&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;status = &amp;quot;okay&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;label&amp;nbsp; &amp;nbsp;= &amp;quot;LPUART&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req-pin =&amp;lt;46&amp;gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rdy-pin = &amp;lt;47&amp;gt;;&lt;/p&gt;
&lt;p&gt;};&lt;/p&gt;
&lt;p&gt;};&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Apart from this, here is a sample of turning off and on the UART during run-time you can look at: &lt;a title="https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/boards/nrf/system_off" href="https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/boards/nrf/system_off" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/boards/nrf/system_off&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339748?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 08:02:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:444d2aaf-2b6a-4373-b497-34394a950a2b</guid><dc:creator>RHeine</dc:creator><description>&lt;p&gt;Good Morning Kazi,&lt;/p&gt;
&lt;p&gt;Thank you for your answer.&lt;/p&gt;
&lt;p&gt;&amp;quot; &lt;strong&gt;&amp;#39;Do you know what I should do to wake up the uart&amp;nbsp;?&amp;#39;&amp;#39; -- &lt;/strong&gt;I will look at tis new query soon. &amp;quot;&lt;/p&gt;
&lt;p&gt;Do you have some news about how to wake up the uart ?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Rob.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339742?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 07:04:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aaf009c7-1850-497f-a832-ecc011271508</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Robert,&lt;/p&gt;
&lt;p&gt;Good Morning.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Your advertising picture looks normal. And you are right with the configuration for the first 2.&lt;/p&gt;
&lt;p&gt;The last configuration will not work. Because we can not disable Serial from both prj.conf and config file (hci_rpmsg.conf) from the child image folder. In the prj.conf file it should be like this&amp;nbsp;&lt;strong&gt;#CONFIG_SERIAL=n.&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339600?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2021 10:42:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1045e112-ff93-4c74-a9ba-ac71d09a441b</guid><dc:creator>RHeine</dc:creator><description>&lt;p&gt;I tryed:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;#CONFIG_SERIAL=y &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;#CONFIG_SERIAL=n&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot; into prj.conf&lt;/p&gt;
&lt;p&gt;That advertising.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CONFIG_SERIAL=y &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;#CONFIG_SERIAL=n&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot; into prj.conf&lt;/p&gt;
&lt;p&gt;That advertising too.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;#CONFIG_SERIAL=y &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CONFIG_SERIAL=n&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot; into prj.conf&lt;/p&gt;
&lt;p&gt;That do not advertising.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339594?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2021 10:27:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2eb02c0-a6a6-480b-971f-2a832c967322</guid><dc:creator>RHeine</dc:creator><description>&lt;p&gt;Hi Kazi,&lt;/p&gt;
&lt;p&gt;&amp;quot;Could you please try this first ? 1.&amp;nbsp;&lt;strong&gt;#CONFIG_SERIAL=y&amp;quot; and&amp;nbsp; &amp;quot;#CONFIG_SERIAL=n&amp;quot; into prj.conf&amp;nbsp; 2.&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;CONFIG_SERIAL=n&lt;/span&gt;&lt;/strong&gt;&amp;nbsp;in your&lt;strong&gt;&lt;span&gt;&amp;nbsp;hci_rpmsg.conf file&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;it&amp;#39;s already the configuration I have.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339587?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2021 10:06:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2e5c686-1d5b-4d0c-8b3b-a651c2e605b1</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Robert,&lt;/p&gt;
&lt;p&gt;Good Morning.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry I had a typo in my reply. Instead of witing network core I wrote application core&amp;nbsp; 2times.&lt;/p&gt;
&lt;p&gt;Actually, I meant that you have to add&amp;nbsp;&lt;span&gt;&lt;strong&gt;CONFIG_SERIAL=n&lt;/strong&gt; in your&amp;nbsp;hci_rpmsg.conf file. That means you disable the SERIAL from network core.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;#39;&amp;#39;I&amp;#39;m not sure to understand your reply, I tryed to coment&amp;nbsp; &amp;quot;#CONFIG_SERIAL=y&amp;quot; and&amp;nbsp; &amp;quot;#CONFIG_SERIAL=n&amp;quot; into prj.conf, so I have no config_serial.&amp;#39;&amp;#39;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Yes, this is correct set up in prj.conf.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you please try this first ? 1.&amp;nbsp;&lt;strong&gt;#CONFIG_SERIAL=y&amp;quot; and&amp;nbsp; &amp;quot;#CONFIG_SERIAL=n&amp;quot; into prj.conf&amp;nbsp; 2.&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;CONFIG_SERIAL=n&lt;/span&gt;&lt;/strong&gt;&amp;nbsp;in your&lt;strong&gt;&lt;span&gt;&amp;nbsp;hci_rpmsg.conf file&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;#39;Do you know what I should do to wake up the uart&amp;nbsp;?&amp;#39;&amp;#39; -- &lt;/strong&gt;I will look at tis new query soon.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kazi Afroza Sultana&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339578?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2021 09:25:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da6db0ef-bb10-4d74-8db7-775881024ee4</guid><dc:creator>RHeine</dc:creator><description>&lt;p&gt;Good Morning Kazi,&lt;/p&gt;
&lt;p&gt;Thank very much you for your answer and your help.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure to understand your reply, I tryed to coment&amp;nbsp; &amp;quot;#CONFIG_SERIAL=y&amp;quot; and&amp;nbsp; &amp;quot;#CONFIG_SERIAL=n&amp;quot; into prj.conf, so I have no config_serial.&lt;/p&gt;
&lt;p&gt;After that advertising restart and I have a wonder consumption during advertising, arround 110uA !&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/zoom_5F00_ppk_2D00_20211118T090144.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;But I can not use the uart when I&amp;#39;m connected, I tryed to send &amp;quot;azerty&amp;quot; from Rx Characteristic nothing was received by putty, after the third try it make my an error 133 Gatt Error and error 8 Gatt Conn Timeout.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Capture-d_2700E900_crans_5F00_20211118_2D00_095952.png" alt=" " /&gt; &lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/8838.Putty.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;When I made a reset, the consumtion start to be around 770uA and after connect and disconnect it fall around 117uA.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/start_5F00_before_5F00_connect_2D00_disconnect_5F00_ppk_2D00_20211118T090039.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/advert_5F00_connect_5F00_disconnect_5F00_ppk_2D00_20211118T085558.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;It look like the uart do not wake up after connected. I think I forgot something to wake up the uart when I&amp;#39;m connected. And I should maybe put the function uart_0_disable() into uart_init() to start at a low consumption after reset.&lt;/p&gt;
&lt;p&gt;Do you know what I should do to wake up the uart ?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_uart_5F00_disable_5F00_b-_2800_2_2900_.zip"&gt;devzone.nordicsemi.com/.../peripheral_5F00_uart_5F00_disable_5F00_b-_2800_2_2900_.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Rob.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339479?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 15:14:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09195ae1-60ee-41c1-a559-c5444dc36edd</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Helo Robert,&lt;/p&gt;
&lt;p&gt;I think you have disable the serial from Application core as well. By disabling &lt;strong&gt;CONFIG_SERIAL = n&lt;/strong&gt; from &lt;strong&gt;prj.conf&lt;/strong&gt; file. You just need to disable SERIAL from Network core ( you have done this in hci_rpmsg.conf). That&amp;#39;s why it has lost connection from Application core and you are not getting advertising data.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/3426.pastedimage1637162020974v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I tested your code with this set up and got the following output from during current measurement.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2425.pastedimage1637163366305v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Could you please try this and observe what is the output?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339365?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 09:26:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee396430-7942-45cb-ba9d-6fb8e36be5d5</guid><dc:creator>RHeine</dc:creator><description>&lt;p&gt;Good morning Kazi Afroza Sultana,&lt;/p&gt;
&lt;p&gt;Thank you for your answer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just before your answer, I made progress.&lt;/p&gt;
&lt;p&gt;I discover that the error disappears when I put &amp;quot;CONFIG_SERIAL=n&amp;quot;.&lt;/p&gt;
&lt;p&gt;Then I discover the blog : Optimizing Power on nRF5340 SoC Designs&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/optimizing-power-on-nrf53-designs"&gt;https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/optimizing-power-on-nrf53-designs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I tryed to put into prj.conf:&lt;/p&gt;
&lt;p&gt;&amp;quot;CONFIG_PM=y&lt;br /&gt;CONFIG_PM_DEVICE=y&amp;quot;&lt;/p&gt;
&lt;p&gt;I still have no error but there is no more advertising ...&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/ppk_2D00_20211117T091901.png" /&gt;&lt;/p&gt;
&lt;p&gt;What should I do to continu advertising ?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_uart_5F00_disable_5F00_b.zip"&gt;devzone.nordicsemi.com/.../peripheral_5F00_uart_5F00_disable_5F00_b.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Rob.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339356?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 08:56:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07f71a46-f224-473c-b062-ba49195c5e7c</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Heine,&lt;/p&gt;
&lt;p&gt;Good Morning.&lt;/p&gt;
&lt;p&gt;I have looked at your code and configuration file. The error you get &amp;#39;undefined reference to&lt;strong&gt;&amp;nbsp;&amp;#39;pm_device_state_set&lt;/strong&gt;&amp;#39;. The issues may be not related to the UART. It seems that pm_device_state_set() is only defined if CONFIG_PM is set the prj.conf. You can try this first. Set the CONFIG_PM and see if it defined then.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ncs1.61 peripheral_uart :  enable uart when connected and disable uart when disconnected</title><link>https://devzone.nordicsemi.com/thread/339135?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 07:56:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:242f0e07-822e-43ad-afe2-33d648cd6f55</guid><dc:creator>RHeine</dc:creator><description>&lt;p&gt;Additionnal information:&lt;/p&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I found this ticket &amp;quot;UART Enable/Disable with sdk v1.3.0&amp;quot;: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/63714/uart-enable-disable-with-sdk-v1-3-0"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/63714/uart-enable-disable-with-sdk-v1-3-0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I tryed to use this code:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;void uart_0_disable(void)&lt;/em&gt;&lt;br /&gt;&lt;em&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; struct device *uart0_dev = device_get_binding(&amp;quot;UART_0&amp;quot;);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; device_set_power_state(uart0_dev, DEVICE_PM_OFF_STATE, NULL, NULL);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gpio_pin_configure(gpio_dev, PIN_UART_0_RX, GPIO_OUTPUT);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gpio_pin_set(gpio_dev, PIN_UART_0_RX, 0);&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gpio_pin_configure(gpio_dev, PIN_UART_0_TX, GPIO_OUTPUT);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gpio_pin_set(gpio_dev, PIN_UART_0_TX, 0);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;void uart_0_enable(void)&lt;/em&gt;&lt;br /&gt;&lt;em&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; struct device *uart0_dev = device_get_binding(&amp;quot;UART_0&amp;quot;);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; device_set_power_state(uart0_dev, DEVICE_PM_ACTIVE_STATE, NULL, NULL);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;I modified the code for sdk 1.6.1 like this:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;#include &amp;lt;pm/state.h&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;#include &amp;lt;pm/device.h&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;#include &amp;lt;pm/pm.h&amp;gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;#include &amp;lt;drivers/gpio.h&amp;gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;void uart_0_disable(void)&lt;/em&gt;&lt;br /&gt;&lt;em&gt;{&amp;nbsp; &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; uart = device_get_binding(DT_LABEL(DT_NODELABEL(uart0)));&lt;br /&gt;&amp;nbsp;&amp;nbsp; pm_device_state_set(uart, PM_DEVICE_STATE_OFF, NULL, NULL); &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; gpio_pin_configure(uart, 22, GPIO_DISCONNECTED);&lt;br /&gt;&amp;nbsp;&amp;nbsp; gpio_pin_set(uart, 22, 0);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; gpio_pin_configure(uart, 20, GPIO_DISCONNECTED);&lt;br /&gt;&amp;nbsp;&amp;nbsp; gpio_pin_set(uart, 20, 0);&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/em&gt;&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;void uart_0_enable(void)&lt;/em&gt;&lt;br /&gt;&lt;em&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/em&gt;uart = device_get_binding(DT_LABEL(DT_NODELABEL(uart0)));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pm_device_state_set(uart, PM_STATE_ACTIVE, NULL, NULL);&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;But I still have this error:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;/main.c:116: &amp;#39;&lt;strong&gt;undefined reference to `pm_device_state_set&lt;/strong&gt;&amp;#39;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;collect2.exe: error: ld returned 1 exit status&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could anyone help me to resolve this error, please ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Rob.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>