<?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>Reconfig UART RX PIN as GPIO and use it to wake-up 52840. And how to do it using Zephyr UART?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79361/reconfig-uart-rx-pin-as-gpio-and-use-it-to-wake-up-52840-and-how-to-do-it-using-zephyr-uart</link><description>Hi All, 
 I am new to Zephyr/NCS, so I am a little confused about which UART driver (Zephyr&amp;#39;s uart/nrf_libuarte/nrfx_uart/nrfx_uarte) to use to approach this feature with the lowest power consumption: 
 My custom 52840 board have 2-wire rx/tx connected</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Sep 2021 06:01:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79361/reconfig-uart-rx-pin-as-gpio-and-use-it-to-wake-up-52840-and-how-to-do-it-using-zephyr-uart" /><item><title>RE: Reconfig UART RX PIN as GPIO and use it to wake-up 52840. And how to do it using Zephyr UART?</title><link>https://devzone.nordicsemi.com/thread/329132?ContentTypeID=1</link><pubDate>Mon, 13 Sep 2021 06:01:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63aedb0a-32f0-44bc-aed4-c68c57f1672f</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Anthony&lt;/p&gt;
&lt;p&gt;Indeed, the development will be somewhat different on NCS than in the nRF5 SDK. The equivalent of app_uart_close() in NCS would be the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfx/drivers/uart/driver.html?highlight=uart_uninit#c.nrfx_uart_uninit"&gt;nrfx_uart_uninit &lt;/a&gt;function which uninitializes and closes the UART driver.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reconfig UART RX PIN as GPIO and use it to wake-up 52840. And how to do it using Zephyr UART?</title><link>https://devzone.nordicsemi.com/thread/328908?ContentTypeID=1</link><pubDate>Fri, 10 Sep 2021 04:09:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d8ec8a6-f5e0-4fb4-9200-f64fa662fea9</guid><dc:creator>Anthony Yuan</dc:creator><description>&lt;p&gt;Thanks for the update Simon.&lt;/p&gt;
&lt;p&gt;I read lpuart sample code and it looks like a sample shows how to use 4-wire lpuart but I can not find how it handles rdy-pin.&lt;/p&gt;
&lt;p&gt;I came across this repo &lt;a href="https://github.com/NordicPlayground/nrf51-UART-examples/"&gt;NordicPlayground/nrf51-UART-examples&lt;/a&gt; and it use below code to set UART off when CTS pin toggled.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t app_uart_close(uint16_t app_uart_uid)
{
    uint16_t gpiote_uid;

    if (app_uart_uid &amp;lt; UART_INSTANCE_GPIOTE_BASE)
    {
        on_uart_event(ON_UART_CLOSE);
        return NRF_SUCCESS;
    }

    gpiote_uid = (app_uart_uid &amp;gt;&amp;gt; 8) &amp;amp; UART_INSTANCE_GPIOTE_BASE;

    if (gpiote_uid != m_gpiote_uid)
    {
        return NRF_ERROR_INVALID_PARAM;
    }

    on_uart_event(ON_UART_CLOSE);

    return app_gpiote_user_disable(m_gpiote_uid);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function for disabling the UART when entering the UART_OFF state.
 */
static void action_uart_deactivate(void)
{
    m_current_state         = UART_OFF;
    NRF_UART0-&amp;gt;TASKS_STOPTX = 1;
    NRF_UART0-&amp;gt;TASKS_STOPRX = 1;
    NRF_UART0-&amp;gt;ENABLE       = (UART_ENABLE_ENABLE_Disabled &amp;lt;&amp;lt; UART_ENABLE_ENABLE_Pos);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But I can not find code handle NRF_UART0 register in NCS1.6.1, seems deprecated?&lt;/p&gt;
&lt;p&gt;Could you let me know which function is the counterpart of app_uart_close() in NCS?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Anthony&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reconfig UART RX PIN as GPIO and use it to wake-up 52840. And how to do it using Zephyr UART?</title><link>https://devzone.nordicsemi.com/thread/328767?ContentTypeID=1</link><pubDate>Thu, 09 Sep 2021 10:27:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:098a6714-e715-4c79-b5c1-00c91f2c133c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi The lpuart source code can be found in&lt;strong&gt; \NCS_FOLDER\v1.x.0\nrf\samples\peripheral\lpuart.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reconfig UART RX PIN as GPIO and use it to wake-up 52840. And how to do it using Zephyr UART?</title><link>https://devzone.nordicsemi.com/thread/328480?ContentTypeID=1</link><pubDate>Wed, 08 Sep 2021 03:22:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce0bf2e5-6973-414b-b805-0a9b8b85f6e0</guid><dc:creator>Anthony Yuan</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;I came across this thread during my search: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/74712/can-the-lpuart-be-used-without-the-2-additional-control-lines"&gt;can-the-lpuart-be-used-without-the-2-additional-control-lines&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think I can not take the advantage of lpuart directly, as config the rdy-pin to use the same GPIO as the rx-pin will not work.&lt;/p&gt;
&lt;p&gt;Can I find the source code of how rdy-pin/IRQ is handled by nrf-sw-lpuart? Maybe I can use it as an example to modified my own 2-wire UART application which using IRQ of rx-pin to enable UART receiver.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Anthony&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reconfig UART RX PIN as GPIO and use it to wake-up 52840. And how to do it using Zephyr UART?</title><link>https://devzone.nordicsemi.com/thread/328415?ContentTypeID=1</link><pubDate>Tue, 07 Sep 2021 13:24:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec684396-bb88-48be-b522-85a65e6da357</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Anthony&lt;/p&gt;
&lt;p&gt;Have you checked out the &lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/nrf/drivers/uart_nrf_sw_lpuart.html#configuration"&gt;low power UART driver&lt;/a&gt; in NCS? It does exactly what you&amp;#39;re describing here in terms of enabling the RX channel before setting up the receiver and go to sleep (low power state).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>