<?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>LPUART first message fails</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118188/lpuart-first-message-fails</link><description>Hi, Currently Im developing on a custom board that has a NRF52840 and a NRF9160. Both MCUs communicate using UART Async API and I added the support for LPUART on both sides - the firmware used in the NRF9160 is the SLM and on the NRF52840 a custom one</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 31 Jan 2025 07:51:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118188/lpuart-first-message-fails" /><item><title>RE: LPUART first message fails</title><link>https://devzone.nordicsemi.com/thread/520817?ContentTypeID=1</link><pubDate>Fri, 31 Jan 2025 07:51:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:621886e1-fa3c-4e7d-90a6-227836ae53cb</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Based on the zephyr version print, it seems that you are using ncs v2.4.x.&lt;/p&gt;
&lt;p&gt;&lt;a title="https://github.com/nrfconnect/sdk-nrf/blob/v2.4.4/west.yml#l62" href="https://github.com/nrfconnect/sdk-nrf/blob/v2.4.4/west.yml#L62" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v2.4.4/west.yml#L62&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This could be an issue that we have fixed in newer versions.&lt;/p&gt;
&lt;p&gt;Have you tried latest version of NCS?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPUART first message fails</title><link>https://devzone.nordicsemi.com/thread/519390?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2025 17:42:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0da287f-8e4f-49d6-9cd7-1c2aa76ea916</guid><dc:creator>Miguel Ferreira</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Meanwhile I found a &amp;quot;dirty&amp;quot; solution to this. But first going to your question. The LPUART configs are being set by using &lt;code&gt;uart_configure &lt;/code&gt;function. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;struct uart_config uart_cfg = {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; /* data */&lt;/code&gt;&lt;br /&gt;&lt;code&gt; .baudrate = 115200,&lt;/code&gt;&lt;br /&gt;&lt;code&gt; .parity = UART_CFG_PARITY_NONE,&lt;/code&gt;&lt;br /&gt;&lt;code&gt; .stop_bits = UART_CFG_STOP_BITS_1,&lt;/code&gt;&lt;br /&gt;&lt;code&gt; .data_bits = UART_CFG_DATA_BITS_8,&lt;/code&gt;&lt;br /&gt;&lt;code&gt; .flow_ctrl = UART_CFG_FLOW_CTRL_NONE};&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Device Tree:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;amp;uart1 {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; /* UART to NRF91 */&lt;/code&gt;&lt;br /&gt;&lt;code&gt; compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; status = &amp;quot;okay&amp;quot;;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; current-speed = &amp;lt;115200&amp;gt;;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; pinctrl-0 = &amp;lt;&amp;amp;uart1_default&amp;gt;;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; pinctrl-1 = &amp;lt;&amp;amp;uart1_sleep&amp;gt;;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; lpuart: nrf-sw-lpuart {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; compatible = &amp;quot;nordic,nrf-sw-lpuart&amp;quot;;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; status = &amp;quot;okay&amp;quot;;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; req-pin = &amp;lt;6&amp;gt;;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; rdy-pin = &amp;lt;12&amp;gt;;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; };&lt;/code&gt;&lt;br /&gt;&lt;code&gt;};&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;amp;gpiote {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; interrupts = &amp;lt;6 NRF_DEFAULT_IRQ_PRIORITY&amp;gt;;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;};&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;A similar config applies to the NRF9160 side.&lt;br /&gt;Packet size and message size are ok. &lt;br /&gt;&lt;br /&gt;Regarding the solution I currently found, the change introduced is basically on the NRF52840 side. So, after sending a message I will wait 25 ms and force the RDY and REQ pins. By forcing I mean, call the &lt;code&gt;rdy_pin_blink&lt;/code&gt; and &lt;code&gt;req_pin_idle&lt;/code&gt; from the LPUART driver. By doing this the system behaves as expected - I receive the whole payload and the first message is sent. Maybe what Im seeing is a timing issue regarding the REQ and RDY lines. Do you have any idea what could cause this ?&lt;br /&gt;&lt;br /&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPUART first message fails</title><link>https://devzone.nordicsemi.com/thread/519373?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2025 16:36:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40c341f3-e9dd-4ec9-bc01-f690a2649b3b</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;How have you set the&amp;nbsp;&lt;span&gt;LPUART configurations? If the packet size and buffer size are accordance to the message size?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>