<?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>UART Rx interrupt not enabled after PM_DEVICE_ACTION_RESUME</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123449/uart-rx-interrupt-not-enabled-after-pm_device_action_resume</link><description>Hello, 
 I&amp;#39;m adding power management to a custom driver that talks to a sensor via uart2 of the nRF9151DK. But from my tests it seems that uart_irq_rx_enable() has no effect after the driver resumes the uart device with pm_device_runtime_get(). 
 The</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Aug 2025 09:20:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123449/uart-rx-interrupt-not-enabled-after-pm_device_action_resume" /><item><title>RE: UART Rx interrupt not enabled after PM_DEVICE_ACTION_RESUME</title><link>https://devzone.nordicsemi.com/thread/544893?ContentTypeID=1</link><pubDate>Thu, 07 Aug 2025 09:20:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:453041ba-5b03-411b-8dff-869513c6cfec</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for sharing a schematic.&lt;/p&gt;
&lt;p&gt;Are you using THVD1426DR (&lt;a href="https://www.ti.com/lit/ds/symlink/thvd1426.pdf"&gt;https://www.ti.com/lit/ds/symlink/thvd1426.pdf&lt;/a&gt;)? I was not able to get any hits on ..1436DR.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Lalo_16"]&lt;p&gt;The strange behavior of the &lt;strong&gt;NRF_TXD &lt;/strong&gt;(yellow trace) when &lt;strong&gt;&lt;em&gt;zephyr,pm-device-runtime-auto&lt;/em&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;is enabled -although not optimal-&amp;nbsp;&lt;/span&gt;is not affecting the correct transmition of the command to the sensor, and the subsequent response from the sensor is received in the &lt;strong&gt;NRF_RXD&lt;/strong&gt; pin.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This in my opinion discards any hardware related issues and points to some configuration issue in the uart power management that is not enabling rx interrupts when the device is reactivated.&lt;/p&gt;[/quote]
&lt;p&gt;Thank you again for clarifying.&lt;/p&gt;
&lt;p&gt;You have an external pull up on that line.&amp;nbsp;Given that the signal is between VDD and GND, it indicates that you have a component that is pulling down on that line. It seems to settle at around 2.5V, as compared to the expected 3.3V.&lt;/p&gt;
&lt;p&gt;I highly suspect that this is the nRF TXD GPIO which is in a output state, when you&amp;#39;re switching off the transceiver device. Have you tried re-configuring P0.24 to be floating when you place your ext sensor in a suspended state?&lt;/p&gt;
&lt;p&gt;You are suspending your sensor, and not the (NRF) UARTE peripheral.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Rx interrupt not enabled after PM_DEVICE_ACTION_RESUME</title><link>https://devzone.nordicsemi.com/thread/544861?ContentTypeID=1</link><pubDate>Thu, 07 Aug 2025 01:43:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9d14787-da05-4c7f-9dac-797227898e13</guid><dc:creator>Lalo_16</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/123449/uart-rx-interrupt-not-enabled-after-pm_device_action_resume/544745"]Could you share a schematic or any info about your sensor setup?[/quote]
&lt;p&gt;The colors correspond to the scope traces mentioned above.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1754529995481v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;As mentioned before, regardless of whether&amp;nbsp;&lt;strong&gt;&lt;em&gt;zephyr,pm-device-runtime-auto&lt;/em&gt;&lt;/strong&gt; is enabled under the uart node, the trace shows a response in the &lt;strong&gt;NRF_RXD&lt;/strong&gt;&amp;nbsp;(teal trace)&amp;nbsp;pin.&lt;/p&gt;
&lt;p&gt;The strange behavior of the &lt;strong&gt;NRF_TXD &lt;/strong&gt;(yellow trace) when &lt;strong&gt;&lt;em&gt;zephyr,pm-device-runtime-auto&lt;/em&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;is enabled -although not optimal-&amp;nbsp;&lt;/span&gt;is not affecting the correct transmition of the command to the sensor, and the subsequent response from the sensor is received in the &lt;strong&gt;NRF_RXD&lt;/strong&gt; pin.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This in my opinion discards any hardware related issues and points to some configuration issue in the uart power management that is not enabling rx interrupts when the device is reactivated.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Lalo&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Rx interrupt not enabled after PM_DEVICE_ACTION_RESUME</title><link>https://devzone.nordicsemi.com/thread/544745?ContentTypeID=1</link><pubDate>Wed, 06 Aug 2025 09:56:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eee425fd-b366-4419-bb0e-bccf252b3b45</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you share a schematic or any info about your sensor setup?&lt;/p&gt;
[quote user="hkn"]Can you share a schematic or similar on how this is setup? [/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;NRF_RXD shall be driven by the EXT_SENSOR_TXD pin.&lt;/p&gt;
&lt;p&gt;One of the sides is pulling the pin. If you disconnect either side, you can measure which side tries to pull low.&lt;/p&gt;
&lt;p&gt;If it is the NRF, check the NRF_GPIO register for the specific pin to see if it is set as output low.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Rx interrupt not enabled after PM_DEVICE_ACTION_RESUME</title><link>https://devzone.nordicsemi.com/thread/544663?ContentTypeID=1</link><pubDate>Tue, 05 Aug 2025 13:50:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:414116b4-4cea-474c-afcb-2dd6a0aac493</guid><dc:creator>Lalo_16</dc:creator><description>[quote userid="2115" url="~/f/nordic-q-a/123449/uart-rx-interrupt-not-enabled-after-pm_device_action_resume/544650"]Can you share a schematic or similar on how this is setup? There&amp;#39;s an enable pin in the mix here as well on P0.07, what is its function?[/quote]
&lt;p&gt;P0.07 is connected to the transceiver&amp;#39;s EN pin.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/123449/uart-rx-interrupt-not-enabled-after-pm_device_action_resume/544650"]What is the configured IO voltage of the nRF9151-DK? [/quote]
&lt;p&gt;3.3V&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/123449/uart-rx-interrupt-not-enabled-after-pm_device_action_resume/544650"]It is hard to see what line is from the nRF and which is from the sensor, NRF_RXD or is it SENSOR_RXD that is misbehaving?[/quote]
&lt;p&gt;The teal trace is &lt;strong&gt;NRF_RXD&lt;/strong&gt;, in both cases -with an wihout&amp;nbsp;&lt;strong&gt;&lt;em&gt;zephyr,pm-device-runtime-auto&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;&amp;nbsp;selected in the uart node-&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;&lt;/em&gt;, the sensor sends a valid response. So the Rx timeout should be related to the &lt;em&gt;pm&lt;/em&gt; config and not hardware related.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Lalo&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Rx interrupt not enabled after PM_DEVICE_ACTION_RESUME</title><link>https://devzone.nordicsemi.com/thread/544650?ContentTypeID=1</link><pubDate>Tue, 05 Aug 2025 13:19:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e00df2df-b726-450a-8adc-7ddc78b27d31</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Lalo_16"]The sensor is powered from the 5V rail on the DK and has an RS-485 interface[/quote]
&lt;p&gt;Can you share a schematic or similar on how this is setup? There&amp;#39;s an enable pin in the mix here as well on P0.07, what is its function?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What is the configured IO voltage of the nRF9151-DK? This is set in your board configurator:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/nrf-connect-board-configurator/page/updating.html"&gt;https://docs.nordicsemi.com/bundle/nrf-connect-board-configurator/page/updating.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Or you can just measure it with a multimeter.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is hard to see what line is from the nRF and which is from the sensor, NRF_RXD or is it SENSOR_RXD that is misbehaving?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If both are indeed on the same voltage level, it does seem like there&amp;#39;s an output vs. an output, and the strongest one drags it up to approx. 2.5V:&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1754399839636v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Teal line does not seem to have this issue.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Rx interrupt not enabled after PM_DEVICE_ACTION_RESUME</title><link>https://devzone.nordicsemi.com/thread/544603?ContentTypeID=1</link><pubDate>Tue, 05 Aug 2025 11:28:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b23072d-79a8-4599-9654-cc453b920bb6</guid><dc:creator>Lalo_16</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The sensor is powered from the 5V rail on the DK and has an RS-485 interface, so I&amp;#39;m using this&amp;nbsp;&lt;a href="https://download.mikroe.com/documents/datasheets/THVD1426_datasheet.pdf"&gt;transceiver&lt;/a&gt;&amp;nbsp;powered from the VIO (3.3V) rail, both remain powered during the test.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The DK&amp;#39;s Rx line has an external pull-up on the transceiver board.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&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;Lalo&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Rx interrupt not enabled after PM_DEVICE_ACTION_RESUME</title><link>https://devzone.nordicsemi.com/thread/544548?ContentTypeID=1</link><pubDate>Tue, 05 Aug 2025 05:33:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ff51808-be90-40a5-94be-326b1128ec3c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Is your sensor and the nRF9151 (VDDIO net) running on the same voltage?&lt;/p&gt;
&lt;p&gt;Or is it such that you remove power from your external sensor? If yes, then you need to remove the pull-up inside the RXD pin (and&amp;nbsp;set TXD low), as these will then back-power your sensor.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Rx interrupt not enabled after PM_DEVICE_ACTION_RESUME</title><link>https://devzone.nordicsemi.com/thread/544507?ContentTypeID=1</link><pubDate>Mon, 04 Aug 2025 16:18:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db0d67e1-3b5e-46e5-9c00-407522e0f164</guid><dc:creator>Lalo_16</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/123449/uart-rx-interrupt-not-enabled-after-pm_device_action_resume/544463"]If you remove this, then it works without any issues?[/quote]
&lt;p&gt;&lt;span&gt;Yes, sorry if I didn&amp;#39;t give more details, I followed your sugestion and removed sensor_init() from the sensor_pm_action() callback.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m still getting the same results, w&lt;/span&gt;&lt;span&gt;ith this overlay I get an Rx timeout:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart2 {
    status = &amp;quot;okay&amp;quot;;
    current-speed = &amp;lt;4800&amp;gt;;
    pinctrl-0 = &amp;lt;&amp;amp;uart2_default&amp;gt;;
    pinctrl-1 = &amp;lt;&amp;amp;uart2_sleep&amp;gt;;
    pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
    zephyr,pm-device-runtime-auto;

    sensor_test: sensor {
        compatible = &amp;quot;sensor&amp;quot;;
        en-gpios = &amp;lt;&amp;amp;gpio0 7 GPIO_ACTIVE_HIGH&amp;gt;;
        status = &amp;quot;okay&amp;quot;;
        zephyr,pm-device-runtime-auto;
    };
};&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-----------------------------------------------------------------------&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;*** Booting nRF Connect SDK v3.0.2-89ba1294ac9b ***&lt;br /&gt;*** Using Zephyr OS v4.0.99-f791c49f492c ***&lt;br /&gt;[00:00:00.390,655] &amp;lt;inf&amp;gt; sensor_pm_test: Sensor Test Started&lt;br /&gt;[00:00:00.390,686] &amp;lt;inf&amp;gt; test_sensor: Resuming sensor&lt;br /&gt;[00:00:02.391,052] &lt;span style="color:#ff0000;"&gt;&amp;lt;err&amp;gt; test_sensor: Rx Timeout!&lt;/span&gt;&lt;br /&gt;[00:00:02.391,082] &lt;span style="color:#ff0000;"&gt;&amp;lt;err&amp;gt; sensor_pm_test: Could not fetch sample (-62)&lt;/span&gt;&lt;br /&gt;[00:00:02.391,113] &amp;lt;inf&amp;gt; test_sensor: Suspending sensor&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-----------------------------------------------------------------------&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I remove the&amp;nbsp;&lt;strong&gt;&lt;em&gt;zephyr,pm-device-runtime-auto&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;:&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart2 {
    status = &amp;quot;okay&amp;quot;;
    current-speed = &amp;lt;4800&amp;gt;;
    pinctrl-0 = &amp;lt;&amp;amp;uart2_default&amp;gt;;
    pinctrl-1 = &amp;lt;&amp;amp;uart2_sleep&amp;gt;;
    pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
    
    sensor_test: sensor {
        compatible = &amp;quot;sensor&amp;quot;;
        en-gpios = &amp;lt;&amp;amp;gpio0 7 GPIO_ACTIVE_HIGH&amp;gt;;
        status = &amp;quot;okay&amp;quot;;
        zephyr,pm-device-runtime-auto;
    };
};&lt;/pre&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;I get a valid response from the sensor:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;-----------------------------------------------------------------------&lt;/div&gt;
&lt;div&gt;*** Booting nRF Connect SDK v3.0.2-89ba1294ac9b ***&lt;br /&gt;*** Using Zephyr OS v4.0.99-f791c49f492c ***&lt;br /&gt;[00:00:00.414,825] &amp;lt;inf&amp;gt; sensor_pm_test: Sensor Test Started&lt;br /&gt;[00:00:00.414,855] &amp;lt;inf&amp;gt; test_sensor: Resuming sensor&lt;br /&gt;[00:00:01.488,067] &amp;lt;dbg&amp;gt; test_sensor: sensor_uart_isr: Sensor Resp&amp;gt;&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;01 03 0e 00 00 01 00 00 00 00 1e 00 00 00 00 00 |........ ........&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00 ec d7 00 00 00 00 00 00 00 00 00 00 00 00 00 |........ ........&lt;br /&gt;[00:00:01.488,128] &amp;lt;inf&amp;gt; test_sensor: Suspending sensor&lt;/div&gt;
&lt;div&gt;&lt;span&gt;-----------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;For reference, this is the uart ISR handler function:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void sensor_uart_isr(const struct device *uart_dev, void *user_data)
{
    const struct device *dev = user_data;
    struct sensor_data *data = dev-&amp;gt;data;

    ARG_UNUSED(user_data);

    if (uart_dev == NULL)
    {
        return;
    }

    if (!uart_irq_update(uart_dev))
    {
        LOG_DBG(&amp;quot;Unable to start processing interrupts&amp;quot;);
        return;
    }

    if (uart_irq_rx_ready(uart_dev))
    {
        data-&amp;gt;rx_index += uart_fifo_read(uart_dev, &amp;amp;data-&amp;gt;rx_buffer[data-&amp;gt;rx_index], RESP_SIZE - data-&amp;gt;rx_index);

        if (data-&amp;gt;rx_index == RESP_SIZE)
        {
            LOG_HEXDUMP_DBG(data-&amp;gt;rx_buffer, sizeof(data-&amp;gt;rx_buffer), &amp;quot;Sensor Resp&amp;gt;&amp;gt;&amp;quot;);
            data-&amp;gt;rx_index = 0;
            uart_irq_rx_disable(uart_dev);
            k_sem_give(&amp;amp;data-&amp;gt;rx_sem);
        }
    }

    if (uart_irq_tx_ready(uart_dev))
    {
        data-&amp;gt;tx_index +=
            uart_fifo_fill(uart_dev, &amp;amp;data-&amp;gt;tx_buffer[data-&amp;gt;tx_index],
                           CMD_SIZE - data-&amp;gt;tx_index);

        if (data-&amp;gt;tx_index == CMD_SIZE)
        {
            data-&amp;gt;tx_index = 0;
            uart_irq_tx_disable(uart_dev);
            k_sem_give(&amp;amp;data-&amp;gt;tx_sem);
        }
    }
}&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;And the sample_fetch function:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static int sample_fetch(const struct device *dev)
{
    struct sensor_data *data = dev-&amp;gt;data;
    struct sensor_cfg *cfg = dev-&amp;gt;config;
    int ret;
    const uint8_t cmd[] = {0x01, 0x03, 0x00, 0x00, 0x00, 0x07, 0x04, 0x08};

    memset(data-&amp;gt;tx_buffer, &amp;#39;\0&amp;#39;, sizeof(data-&amp;gt;tx_buffer));

    for (size_t i = 0; i &amp;lt; sizeof(cmd); i++)
    {
        data-&amp;gt;tx_buffer[i] = cmd[i];
    }

    data-&amp;gt;rx_index = 0;
    data-&amp;gt;tx_index = 0;

    ret = k_sem_take(&amp;amp;data-&amp;gt;tx_sem, SERIAL_TIMEOUT);
    if (ret &amp;lt; 0)
    {
        LOG_ERR(&amp;quot;Tx Timeout!&amp;quot;);
        return -ETIME;
    }

    k_sem_reset(&amp;amp;data-&amp;gt;rx_sem);
    uart_irq_tx_enable(cfg-&amp;gt;uart_dev);
    uart_irq_rx_enable(cfg-&amp;gt;uart_dev);

    ret = k_sem_take(&amp;amp;data-&amp;gt;rx_sem, SERIAL_TIMEOUT);

    if (ret &amp;lt; 0)
    {
        LOG_ERR(&amp;quot;Rx Timeout!&amp;quot;);
        return -ETIME;
    }

    .....
    Process data...
    .....

    return 0;
}&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I&amp;nbsp;checked the&amp;nbsp;Tx/Rx lines&amp;nbsp;with an oscilloscope and found a strange behavior in the Rx timeout case (Tx-yellow, Rx-blue):&lt;br /&gt;&lt;a href="https://drive.google.com/file/d/1qffy5VsX0SzpNM-E1NP3x8mHtJk92IKK/view?usp=sharing"&gt;drive.google.com/.../view&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;This is the trace for the valid response:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href="https://drive.google.com/file/d/15rAyAmI1k_odM6vixTVe9GJHaR8NT5TV/view?usp=sharing"&gt;drive.google.com/.../view&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Rx interrupt not enabled after PM_DEVICE_ACTION_RESUME</title><link>https://devzone.nordicsemi.com/thread/544463?ContentTypeID=1</link><pubDate>Mon, 04 Aug 2025 13:06:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a1cd3c3-b2ec-4d31-96c6-7237c74e71de</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]If the&amp;nbsp;&amp;nbsp;&lt;strong&gt;&lt;em&gt;zephyr,pm-device-runtime-auto&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;is removed from the uart node in devicetree, the driver gets the response form the sensor.[/quote]
&lt;p&gt;If you remove this, then it works without any issues?&lt;/p&gt;
&lt;p&gt;I would recommend that you check the state, as shown in the docs if my understanding of the issue is correct:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/services/pm/device_runtime.html"&gt;https://docs.zephyrproject.org/latest/services/pm/device_runtime.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Q1: Have you scoped the TXD and RXD lines to confirm the behavior?&lt;/p&gt;
&lt;p&gt;Q2: do you have any debug logs showing the issue?&lt;/p&gt;
&lt;p&gt;It seems that you are always running sensor_init(), meaning that the uart will be re-initialized each time. That will cause a ret != 0 for that function.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>