<?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>NRF9160 Disable UART and RX pin into an interrupt pin</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/99640/nrf9160-disable-uart-and-rx-pin-into-an-interrupt-pin</link><description>Hello everyone, 
 I&amp;#39;m working on a project with NRF9160 nRF Connect SDK v2.3.0. 
 In my project i use UART0 to exchange data and i disable the UART when is not use. 
 I need an interrupt to wake up my device when data come on the UART pin (TX/RX). 
 I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 14 Jun 2023 13:51:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/99640/nrf9160-disable-uart-and-rx-pin-into-an-interrupt-pin" /><item><title>RE: NRF9160 Disable UART and RX pin into an interrupt pin</title><link>https://devzone.nordicsemi.com/thread/431042?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2023 13:51:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:247ade0d-ab5a-42b7-ad3d-0517c137d827</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Thanks for sharing the code. I am glad that you have fixed the issue.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Disable UART and RX pin into an interrupt pin</title><link>https://devzone.nordicsemi.com/thread/430675?ContentTypeID=1</link><pubDate>Tue, 13 Jun 2023 09:16:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4636efee-4cab-486d-b49f-d4438e43541e</guid><dc:creator>Lamdev</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thanks for your help,&lt;/p&gt;
&lt;p&gt;I found a solution that was the following, if this can help someone.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void button_pressed(const struct device *dev, struct gpio_callback *cb,
		    uint32_t pins)
{
	int ret;

	printk(&amp;quot;Button pressed\r\n&amp;quot;);

	ret = gpio_pin_interrupt_configure(button.port,button.pin,GPIO_INT_DISABLE);		//GPIO_INT_EDGE_BOTH
	if (ret != 0) {
		printk(&amp;quot;Error disable INT\r\n&amp;quot;);
		return;
	}
	
	//restart_uart();
	k_work_submit(&amp;amp;button_action_work);
	//flag_interrupt = 1;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;//gpio for UART interrupt definition
void configure_int_rx(void){
	int ret;

	printk(&amp;quot;configure interrupt\r\n&amp;quot;);

	if (!device_is_ready(button.port)) {
		printk(&amp;quot;Error config INT 1\r\n&amp;quot;);
		return;
	}
	
	ret = gpio_pin_configure(button.port,button.pin,GPIO_INPUT);
	if (ret != 0) {
		printk(&amp;quot;Error config INT 2\r\n&amp;quot;);
		return;
	}

	ret = gpio_pin_interrupt_configure(button.port,button.pin,GPIO_INT_EDGE_TO_ACTIVE);		//GPIO_INT_EDGE_BOTH
	if (ret != 0) {
		printk(&amp;quot;Error config INT 3\r\n&amp;quot;);
		return;
	}

	gpio_init_callback(&amp;amp;button_cb_data, button_pressed, BIT(button.pin));

	ret = gpio_add_callback(button.port, &amp;amp;button_cb_data);
	if (ret != 0) {
		printk(&amp;quot;Error config INT 4\r\n&amp;quot;);
		return;
	}

	printk(&amp;quot;Config INT OK\r\n&amp;quot;);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void timer_disable_uart_work_fn(struct k_work *work)
{
	disable_uart();
    configure_int_rx();
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void process_work_timer_uart_disable(void){
	//scehdule a time to disable uart
    //cancel last schedule
    if(k_work_delayable_busy_get(&amp;amp;timer_disable_uart_work) != 0 ){
        k_work_cancel_delayable(&amp;amp;timer_disable_uart_work);
		while(k_work_delayable_busy_get(&amp;amp;timer_disable_uart_work) != 0 );	//wait until cancelation finnish
    }
    //enable new schedule
    k_work_schedule(&amp;amp;timer_disable_uart_work, K_SECONDS(WAIT_UART_DISABLE));
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* other code line to use to work */
#define SWIN3_NODE	DT_ALIAS(swin3)
#if !DT_NODE_HAS_STATUS(SWIN3_NODE, okay)
#error &amp;quot;Unsupported board: SWIN3 devicetree alias is not defined&amp;quot;
#endif


static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SWIN3_NODE, gpios,0); 
static struct gpio_callback button_cb_data;

K_WORK_DEFINE(button_action_work, button_action_work_handler);
void button_action_work_handler(struct k_work *work) {
    //do_something_because_a_button_was_pressed();
	restart_uart();
}

static struct k_work_delayable timer_disable_uart_work;

k_work_init_delayable(&amp;amp;timer_disable_uart_work,timer_disable_uart_work_fn);



&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Disable UART and RX pin into an interrupt pin</title><link>https://devzone.nordicsemi.com/thread/429227?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2023 09:46:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a382d7f-7a70-40cf-9366-fbda18cad9be</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;We think the problem lies where it is starting and stopping the UART. Can you check this&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/56643/how-can-i-enable-and-disable-uart-devices-at-run-time-on-nrf9160/229680"&gt;(+) How can I enable and disable UART devices at run time on nRF9160? - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&amp;nbsp;case? You may need to check the RXTO event.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Kazi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Disable UART and RX pin into an interrupt pin</title><link>https://devzone.nordicsemi.com/thread/426087?ContentTypeID=1</link><pubDate>Wed, 17 May 2023 16:23:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ae98a60-7c4d-435a-b53c-43fbd0e2b03b</guid><dc:creator>Lamdev</dc:creator><description>&lt;p&gt;I have a better answer now,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void button_pressed(const struct device *dev, struct gpio_callback *cb,
		    uint32_t pins)
{
	int ret;
	ret = gpio_pin_interrupt_configure_dt(&amp;amp;button,GPIO_INT_DISABLE);		//GPIO_INT_EDGE_BOTH
	if (ret != 0) {
		printk(&amp;quot;Error disable INT\r\n&amp;quot;);
		return;
	}
	printk(&amp;quot;Button pressed\r\n&amp;quot;);
	restart_uart();

}

uint8_t restart_uart(void){

    NRF_UARTE0_NS-&amp;gt;PSEL.RXD = 6;
    NRF_UARTE0_NS-&amp;gt;PSEL.TXD = 7;
    NRF_UARTE0_NS-&amp;gt;ENABLE = 8;
    NRF_UARTE0_NS-&amp;gt;TASKS_STARTRX = 1;
    NRF_UARTE0_NS-&amp;gt;TASKS_STARTTX = 1;

    send_uart_data_char(&amp;quot;UART RESTARTED\r\n&amp;quot;);

    //initControlUart();

    printk(&amp;quot;restart uart\r\n&amp;quot;);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I correctly have an answer from my UART, i correctly receive &amp;quot;UART RESTARTED&amp;quot;.&lt;/p&gt;
&lt;p&gt;But 2 errors messages stay :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;ERROR : uart_rx_buf_rsp Failed&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;UART_TX_ABORTED&lt;/p&gt;
&lt;p&gt;The first one come from uart libray and the other one come from my uart callback function&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void uart_callback(const struct device *dev, struct uart_event *evt, struct uart_info_struct *user_data){
    uint8_t *buffer, error;
	switch(evt-&amp;gt;type){
		case UART_RX_RDY:
		    //printk(&amp;quot;RCV %d bytes\n&amp;quot;, evt-&amp;gt;data.rx.len);
            if(user_data-&amp;gt;cmd_buffer_len &amp;lt; CMD_BUFF_LEN){
                if((user_data-&amp;gt;cmd_buffer_len + evt-&amp;gt;data.rx.len) &amp;lt;= CMD_BUFF_LEN){
                    //case of new data less than remaining space in cmd_buffer
                    memcpy(user_data-&amp;gt;cmd_buffer + user_data-&amp;gt;cmd_buffer_len, evt-&amp;gt;data.rx.buf + evt-&amp;gt;data.rx.offset, evt-&amp;gt;data.rx.len);
                    user_data-&amp;gt;cmd_buffer_len += evt-&amp;gt;data.rx.len;
                }else{
                    //case of new data more than remaining space
                    memcpy(user_data-&amp;gt;cmd_buffer + user_data-&amp;gt;cmd_buffer_len, evt-&amp;gt;data.rx.buf + evt-&amp;gt;data.rx.offset, CMD_BUFF_LEN - user_data-&amp;gt;cmd_buffer_len);
                    user_data-&amp;gt;cmd_buffer_len += CMD_BUFF_LEN - user_data-&amp;gt;cmd_buffer_len;
                }
            }
            process_buffer(user_data);
		break;
		case UART_TX_ABORTED:
		    printk(&amp;quot;UART_TX_ABORTED\n&amp;quot;);
		break;
		case UART_TX_DONE:
		    //printk(&amp;quot;UART_TX_DONE\n&amp;quot;);
            //printk(&amp;quot;+SEM=%d\n&amp;quot;,k_sem_count_get(user_data-&amp;gt;tx_semaphore));
            k_sem_give(user_data-&amp;gt;tx_semaphore);
            //printk(&amp;quot;+SEM=%d\n&amp;quot;,k_sem_count_get(user_data-&amp;gt;tx_semaphore));
		break;
		case UART_RX_BUF_REQUEST:
            //printk(&amp;quot;UART_RX_BUF_REQUEST\n&amp;quot;);
            buffer = k_malloc(RX_BUFF_LEN);
            if(buffer == NULL){
                printk(&amp;quot;ERROR : RX_BUF_REQUEST Failed to allocate buffer\n&amp;quot;);
                return;
            }
            error = uart_rx_buf_rsp(uart_info.dev, buffer, RX_BUFF_LEN);
            if(error != 0){
                printk(&amp;quot;ERROR : uart_rx_buf_rsp Failed\n&amp;quot;);
                return;
            }
		break;
            case UART_RX_BUF_RELEASED:
            k_free(evt-&amp;gt;data.rx_buf.buf);
            //printk(&amp;quot;UART_RX_BUF_RELEASED\n&amp;quot;);
		break;
		case UART_RX_DISABLED:
		    printk(&amp;quot;UART_RX_DISABLED\n&amp;quot;);
		break;
		case UART_RX_STOPPED:
		    printk(&amp;quot;UART_RX_STOPPED\n&amp;quot;);
		break;
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I think i&amp;#39;m on the right way,&lt;/p&gt;
&lt;p&gt;do you have advice about that ?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Lam&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Disable UART and RX pin into an interrupt pin</title><link>https://devzone.nordicsemi.com/thread/426056?ContentTypeID=1</link><pubDate>Wed, 17 May 2023 10:19:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d15698a8-51e3-49de-b6e4-07ec059d3c6a</guid><dc:creator>Lamdev</dc:creator><description>&lt;p&gt;I found my error, lin 1, I define SWIN3_NODE and line 6 i use SWIN3. That wrong, i need to write on line 6 : &amp;quot;SWIN3_NODE&amp;quot;&lt;/p&gt;
&lt;p&gt;I have add in &amp;quot;configure_int_rx&amp;quot; function,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (!device_is_ready(button.port)) {
		printk(&amp;quot;Error&amp;quot;);
		return;
	}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;At the top of the function&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;//gpio for UART interrupt definition
void configure_int_rx(void){
	int ret;

	printk(&amp;quot;configure interrupt\r\n&amp;quot;);

	if (!device_is_ready(button.port)) {
		printk(&amp;quot;Error&amp;quot;);
		return;
	}

	ret = gpio_pin_configure_dt(&amp;amp;button,GPIO_INPUT);
	if (ret != 0) {
		printk(&amp;quot;Error&amp;quot;);// %d: failed to configure %s pin %d\n&amp;quot;,
		      // ret, button.port-&amp;gt;name, button.pin);
		return;
	}

	printk(&amp;quot;test1\r\n&amp;quot;);

	ret = gpio_pin_interrupt_configure_dt(&amp;amp;button,GPIO_INT_EDGE_TO_ACTIVE);		//GPIO_INT_EDGE_BOTH
	if (ret != 0) {
		printk(&amp;quot;Error&amp;quot;);// %d: failed to configure interrupt on %s pin %d\n&amp;quot;,
			//ret, button.port-&amp;gt;name, button.pin);
		return;
	}

	printk(&amp;quot;test2\r\n&amp;quot;);

	gpio_init_callback(&amp;amp;button_cb_data, button_pressed, BIT(button.pin));
	gpio_add_callback(button.port, &amp;amp;button_cb_data);
	printk(&amp;quot;Set up button&amp;quot;);// at %s pin %d\n&amp;quot;, button.port-&amp;gt;name, button.pin);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;No I&amp;#39;m trying to disable, my interrupt to reenable the uart when my interrupt occur.&lt;/p&gt;
&lt;p&gt;When my interrupt occur, my callback function do that :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void button_pressed(const struct device *dev, struct gpio_callback *cb,
		    uint32_t pins)
{
	const struct device * gpio_dev = DEVICE_DT_GET(DT_NODELABEL(gpio0));
    gpio_pin_configure(gpio_dev,6, GPIO_DISCONNECTED);
	printk(&amp;quot;Button pressed\r\n&amp;quot;);
	restart_uart();

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In my &amp;quot;restart_uart&amp;quot;, i do that&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint8_t restart_uart(void){


   const struct device *uart = DEVICE_DT_GET(DT_NODELABEL(uart0));

    if (!device_is_ready(uart)) {
        printk(&amp;quot;error device ready\r\n&amp;quot;);
        return;
    }
    initControlUart();
    printk(&amp;quot;restart uart\r\n&amp;quot;);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When&amp;nbsp;my initControlUart is executed, i have an error in this code:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; error = uart_rx_enable(uart_info.dev, buffer, RX_BUFF_LEN, RX_RCV_TIMEOUT);
    if(error != 0){
        printk(&amp;quot;ERROR : Unable to init RX\n&amp;quot;);
        return -1;
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;That works great at init but when i try to restart that&amp;#39;s not work. It seems that RX gpio stay unable to be configure in RX&lt;/p&gt;
&lt;p&gt;Update below&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;lam&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Disable UART and RX pin into an interrupt pin</title><link>https://devzone.nordicsemi.com/thread/426053?ContentTypeID=1</link><pubDate>Wed, 17 May 2023 09:44:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:140b2514-eef4-48dd-a1ae-f720ea5f76f0</guid><dc:creator>Lamdev</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m able to disable my uart with this part of code :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint8_t disable_uart(void){

    //Disable uart0 which use to exchange message between modem and an external device
    NRF_UARTE0_NS-&amp;gt;TASKS_STOPTX = 1;
    NRF_UARTE0_NS-&amp;gt;TASKS_STOPRX = 1;
    NRF_UARTE0_NS-&amp;gt;ENABLE = 0;

    //configure RX pin int o input gpio
    const struct device * gpio_dev = DEVICE_DT_GET(DT_NODELABEL(gpio0));
    gpio_pin_configure(gpio_dev,6, GPIO_INPUT);
   
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And i obtain an power consumption arround 6uA.&lt;/p&gt;
&lt;p&gt;Now i&amp;#39;m trying to convert my RX gpio into an interrupt GPIO but without success.&lt;/p&gt;
&lt;p&gt;I have try this after checking information in the sample button in SDK&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define SWIN3_NODE	DT_ALIAS(swin3)
#if !DT_NODE_HAS_STATUS(SWIN3_NODE, okay)
#error &amp;quot;Unsupported board: SWIN3 devicetree alias is not defined&amp;quot;
#endif

static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SWIN3, gpios,{0}); 
static struct gpio_callback button_cb_data;

void button_pressed(const struct device *dev, struct gpio_callback *cb,
		    uint32_t pins)
{
	printk(&amp;quot;Button pressed\r\n&amp;quot;);
}

//gpio for UART interrupt definition
void configure_int_rx(void){
	int ret;

	printk(&amp;quot;configure interrupt\r\n&amp;quot;);

	ret = gpio_pin_configure_dt(&amp;amp;button,GPIO_INPUT);
	if (ret != 0) {
		printk(&amp;quot;Error&amp;quot;);// %d: failed to configure %s pin %d\n&amp;quot;,
		      // ret, button.port-&amp;gt;name, button.pin);
		return;
	}

	printk(&amp;quot;test1\r\n&amp;quot;);

	ret = gpio_pin_interrupt_configure_dt(&amp;amp;button,GPIO_INT_EDGE_TO_ACTIVE);		//GPIO_INT_EDGE_BOTH
	if (ret != 0) {
		printk(&amp;quot;Error&amp;quot;);// %d: failed to configure interrupt on %s pin %d\n&amp;quot;,
			//ret, button.port-&amp;gt;name, button.pin);
		return;
	}

	printk(&amp;quot;test2\r\n&amp;quot;);

	gpio_init_callback(&amp;amp;button_cb_data, button_pressed, BIT(button.pin));
	gpio_add_callback(button.port, &amp;amp;button_cb_data);
	printk(&amp;quot;Set up button&amp;quot;);// at %s pin %d\n&amp;quot;, button.port-&amp;gt;name, button.pin);

}

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The resultat that i obtain is a reboot of my board every time the code start to execute &amp;quot;configure_int_rx&amp;quot; function.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Update below&lt;/p&gt;
&lt;p&gt;thanks for your help,&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Lam&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Disable UART and RX pin into an interrupt pin</title><link>https://devzone.nordicsemi.com/thread/425959?ContentTypeID=1</link><pubDate>Tue, 16 May 2023 16:37:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e690176-2b02-478b-9993-6ecd2a9cef59</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;#39;&amp;#39;So i&amp;#39;m thinking to stop UART completely and waiting an interrupt on my RX line that i will have convert into interrupt GPIO. And when interrupt coming, i reactivate my uart to receive data.&lt;/p&gt;
&lt;p&gt;This way is possible ?&amp;#39;&amp;#39;&lt;/p&gt;
&lt;p&gt;The work sequence of drive (Low power uART) is :&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The transmitter initiates the transmission by calling&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a title="(in Zephyr Project v3.3.99)" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/peripherals/uart.html#c.uart_tx"&gt;&lt;code&gt;&lt;span&gt;uart_tx()&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The driver reconfigures the REQ line to input with pull-up and enables the detection of high to low transition.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The line is set to high due to the pull-up register, and that triggers an interrupt on the RDY line.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On that interrupt, the driver starts the UART receiver.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When the receiver is ready, the driver reconfigures the RDY line to output low.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then, the driver reconfigures the RDY line to input with pull-up and enables the interrupt on detection of high to low transition.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This sequence results in a short pulse on the line, as the line goes low and high.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The initiator detects the pulse and starts the standard UART transfer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When the transfer is completed, the driver reconfigures the REQ line to the initial state: output set to low. This results in a line state change.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;As the line goes low, the receiver detects the change. This indicates that the UART receiver can be stopped.&amp;#39;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So, I think this is possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Disable UART and RX pin into an interrupt pin</title><link>https://devzone.nordicsemi.com/thread/425774?ContentTypeID=1</link><pubDate>Tue, 16 May 2023 07:21:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a69cb5b-be23-4696-9360-6b9f992da5d4</guid><dc:creator>Lamdev</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thanks for your return,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s connected to a specific&amp;nbsp;board that i have develop.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My objectif is to reduce power consumption to 50uA.&lt;/p&gt;
&lt;p&gt;So i&amp;#39;m thinking to stop UART completely and waiting an interrupt on my RX line that i will have convert into interrupt GPIO. And when interrupt coming, i reactivate my uart to receive data.&lt;/p&gt;
&lt;p&gt;This way is possible ?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Lam&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Disable UART and RX pin into an interrupt pin</title><link>https://devzone.nordicsemi.com/thread/425770?ContentTypeID=1</link><pubDate>Tue, 16 May 2023 06:59:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4419c45-cda0-4bf6-bc76-4f1b4be08edf</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Which device are you connecting the nRF9160 to over UART? if it&amp;#39;s another nordic device, you can use our low-power UART driver.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/latest/nrf/samples/peripheral/lpuart/readme.html" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/peripheral/lpuart/README.html" rel="noopener noreferrer" target="_blank"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/peripheral/lpuart/README.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;#39;&amp;#39;The low power UART driver implements the standard&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;asynchronous UART API&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;that can be enabled with the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a title="(in Kconfig reference v&amp;amp;nbsp;)" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_UART_ASYNC_API"&gt;&lt;code&gt;&lt;span&gt;CONFIG_UART_ASYNC_API&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration option. Alternatively, you can also enable the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;interrupt-driven UART API&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;using the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a title="(in Kconfig reference v&amp;amp;nbsp;)" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_NRF_SW_LPUART_INT_DRIVEN"&gt;&lt;code&gt;&lt;span&gt;CONFIG_NRF_SW_LPUART_INT_DRIVEN&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration option.&lt;/p&gt;
&lt;p&gt;The protocol used by this driver implements two control lines, instead of standard hardware flow control lines, to allow for disabling the UART receiver during the idle period. This results in low power consumption, as you can shut down the high-frequency clock when UART is in idle state.&amp;#39;&amp;#39;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Kazi&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: NRF9160 Disable UART and RX pin into an interrupt pin</title><link>https://devzone.nordicsemi.com/thread/425401?ContentTypeID=1</link><pubDate>Fri, 12 May 2023 15:11:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d6104b7-f903-4cff-a30a-9955d694f413</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Lam,&lt;/p&gt;
&lt;p&gt;I have been&amp;nbsp;working in your case. I will get back to you shortly.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Kazi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>