<?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 problem NRF9160(Icarus) to ESP8266</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76610/uart-problem-nrf9160-icarus-to-esp8266</link><description>Hello, 
 at the moment I am trying to get the NRF9160 Icarus Board to communicate with an ESP8266 Board within serial modem mode. I just need to send some AT commands through UART but I don&amp;#39;t get any answer from the ESP8266. The communication with the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Jul 2021 09:43:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76610/uart-problem-nrf9160-icarus-to-esp8266" /><item><title>RE: UART problem NRF9160(Icarus) to ESP8266</title><link>https://devzone.nordicsemi.com/thread/322404?ContentTypeID=1</link><pubDate>Thu, 29 Jul 2021 09:43:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0399a61a-c91d-4c54-bee8-0256ec4fb600</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry for the delay on this. When the status of a case is set to &amp;#39;verified&amp;#39;, it is removed from my queue of cases for good. I stumbled upon your reply just now on accident.&lt;/p&gt;
&lt;p&gt;Have you made any progress in the last 6 days? When using the nrf91 nonsecure board, the uart1 peripheral &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/0944459b5b622048a08ad1f8cf8a044c135fd0d3/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns.dts#L19"&gt;is used by the TF-M&lt;/a&gt;, maybe you could test using uart2 instead?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please tell me if you can&amp;#39;t get it to work, and I&amp;#39;ll take a look&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: UART problem NRF9160(Icarus) to ESP8266</title><link>https://devzone.nordicsemi.com/thread/321495?ContentTypeID=1</link><pubDate>Fri, 23 Jul 2021 07:53:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e710ef45-1401-4155-9d86-a93b844b3216</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;d like to follow up on this subject.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying to use LPUART on nRF5340_cpuappns and nrf9160ns but I can&amp;#39;t get it to work.&lt;/p&gt;
&lt;p&gt;As you mentioned, every tx is failing with Tx aborted and of course, no data is received on the other end.&lt;/p&gt;
&lt;p&gt;&amp;quot;Normal&amp;quot; UART is working perfectly, even with RTS-CTS flow control, so REQ/RDY should also work.&lt;/p&gt;
&lt;p&gt;Something even more strange, setting the GPIOTE priority in the DT makes the GPIO unusable with a lot of pin not changing state when calling gpio_pin_set and none of the interrupt firing.&lt;/p&gt;
&lt;p&gt;For example, in our board, we are also using a SPIM line to communicate with a sensor, which also has an IRQ line.&lt;/p&gt;
&lt;p&gt;If the ```interrupts = &amp;lt;13 NRF_DEFAULT_IRQ_PRIORITY&amp;gt;``` is added to the DT, the communication with the sensor is failing as we don&amp;#39;t receive any IRQ even if the hardware line is correct.&lt;/p&gt;
&lt;p&gt;Once removing the line from the DT, the irq starts working again.&lt;/p&gt;
&lt;p&gt;I may be 1000% wrong, but I have the same feeling as debugging a race condition between 2 modules wanting to use the same memory region or hardware IP at the same time.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Giuliano&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART problem NRF9160(Icarus) to ESP8266</title><link>https://devzone.nordicsemi.com/thread/320093?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 16:08:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0703ada4-57d3-4adc-9f1d-1bf95e73fa5d</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;It doesn&amp;#39;t seem like it is possible to disable req and rdy, but I modified the sample by disabling lpuart (dropping the &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/c34ceebceb4fccd6e2fda1fc27c54640ca498f69/drivers/serial/uart_nrf_sw_lpuart.c"&gt;lpuart&amp;nbsp;driver&lt;/a&gt; and using uart.h-&amp;gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/0944459b5b622048a08ad1f8cf8a044c135fd0d3/drivers/serial/uart_nrfx_uarte.c"&gt;uart async api&lt;/a&gt; directly), and then it&amp;#39;s possible to disable rts and cts.&lt;/p&gt;
&lt;p&gt;Here is the sample. It supports both the nrf9160dk_nrf9160 and the nrf9160dk_nrf9160ns.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/simon-iversen/sdk-nrf/tree/lpuart_using_normal_uart/samples/peripheral/lpuart"&gt;https://github.com/simon-iversen/sdk-nrf/tree/lpuart_using_normal_uart/samples/peripheral/lpuart&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is the changes I applied to the lpuart sample:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/compare/v1.6.0...simon-iversen:lpuart_using_normal_uart"&gt;https://github.com/nrfconnect/sdk-nrf/compare/v1.6.0...simon-iversen:lpuart_using_normal_uart&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/compare/v1.6.0...simon-iversen:lpuart_using_normal_uart.patch"&gt;patch&lt;/a&gt;&lt;/li&gt;
&lt;/ul&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: UART problem NRF9160(Icarus) to ESP8266</title><link>https://devzone.nordicsemi.com/thread/319535?ContentTypeID=1</link><pubDate>Mon, 12 Jul 2021 08:56:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6496815-ea48-41d8-b127-e8a204947cb1</guid><dc:creator>Lemmiwink</dc:creator><description>&lt;p&gt;How can I use this sample to connect with a device without the req and rdy pin?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART problem NRF9160(Icarus) to ESP8266</title><link>https://devzone.nordicsemi.com/thread/318631?ContentTypeID=1</link><pubDate>Mon, 05 Jul 2021 12:05:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf59828b-d87c-4c13-aee4-aa9d9d6d909b</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Try to use some other pins than 46 (P1.14) and 47&amp;nbsp;&lt;span&gt;(P1.14).&lt;/span&gt;&amp;nbsp;The nRF9160 does not support two ports like the nRF52840.&lt;/p&gt;
&lt;p&gt;I tried to get the lpuart board working with the &lt;strong&gt;nonsecure&lt;/strong&gt; nrf9160, but I encountered &amp;quot;TX aborted&amp;quot;, please get back to me if you encounter the same with your custom board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART problem NRF9160(Icarus) to ESP8266</title><link>https://devzone.nordicsemi.com/thread/317480?ContentTypeID=1</link><pubDate>Mon, 28 Jun 2021 12:22:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91ee8418-e9f7-4c7f-bbb3-e84d158d38f3</guid><dc:creator>Lemmiwink</dc:creator><description>&lt;p&gt;I just tested it with your suggested changes and with nRF Connect SDK v1.6.0-rc2. I am using the icarus Board and created the following two documents within lpuart/Boards to get Board support:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/* actinius_icarus_ns.overlay */

&amp;amp;uart1 {
	status = &amp;quot;okay&amp;quot;;

	current-speed = &amp;lt;115200&amp;gt;;
	tx-pin = &amp;lt;24&amp;gt;;
	rx-pin = &amp;lt;23&amp;gt;;
	
	lpuart: nrf-sw-lpuart {
                compatible = &amp;quot;nordic,nrf-sw-lpuart&amp;quot;;
                status = &amp;quot;okay&amp;quot;;
                label = &amp;quot;LPUART&amp;quot;;
                req-pin = &amp;lt;46&amp;gt;;
                rdy-pin = &amp;lt;47&amp;gt;;
        };
};

&amp;amp;gpiote {
	interrupts = &amp;lt;13 NRF_DEFAULT_IRQ_PRIORITY&amp;gt;;
};&lt;/pre&gt;&lt;pre class="ui-code" data-mode="text"&gt;## actinius_icarus_ns.conf

CONFIG_UART_1_ASYNC=y
CONFIG_UART_1_INTERRUPT_DRIVEN=n
CONFIG_UART_1_NRF_HW_ASYNC=y
CONFIG_UART_1_NRF_HW_ASYNC_TIMER=2
CONFIG_NRFX_TIMER2=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately I get the following outprint after flashing:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;E: Could not get GPIO Device Binding
*** Booting Zephyr OS build v2.6.0-rc1-ncs1-rc1  ***
Flash regions           Domain          Permissions
00 01 0x00000 0x10000   Secure          rwxl
02 31 0x10000 0x100000  Non-Secure      rwxl

Non-secure callable region 0 placed in flash region 1 with size 32.

SRAM region             Domain          Permissions
00 07 0x00000 0x10000   Secure          rwxl
08 31 0x10000 0x40000   Non-Secure      rwxl

Peripheral              Domain          Status
00 NRF_P0               Non-Secure      OK
01 NRF_CLOCK            Non-Secure      OK
02 NRF_RTC0             Non-Secure      OK
03 NRF_RTC1             Non-Secure      OK
04 NRF_NVMC             Non-Secure      OK
05 NRF_UARTE1           Non-Secure      OK
06 NRF_UARTE2           Secure          SKIP
07 NRF_TWIM2            Non-Secure      OK
08 NRF_SPIM3            Non-Secure      OK
09 NRF_TIMER0           Non-Secure      OK
10 NRF_TIMER1           Non-Secure      OK
11 NRF_TIMER2           Non-Secure      OK
12 NRF_SAADC            Non-Secure      OK
13 NRF_PWM0             Non-Secure      OK
14 NRF_PWM1             Non-Secure      OK
15 NRF_PWM2             Non-Secure      OK
16 NRF_PWM3             Non-Secure      OK
17 NRF_WDT              Non-Secure      OK
18 NRF_IPC              Non-Secure      OK
19 NRF_VMC              Non-Secure      OK
20 NRF_FPU              Non-Secure      OK
21 NRF_EGU1             Non-Secure      OK
22 NRF_EGU2             Non-Secure      OK
23 NRF_DPPIC            Non-Secure      OK
24 NRF_REGULATORS       Non-Secure      OK
25 NRF_PDM              Non-Secure      OK
26 NRF_I2S              Non-Secure      OK
27 NRF_GPIOTE1          Non-Secure      OK

SPM: NS image at 0x10000
SPM: NS MSP at 0x20011838
SPM: NS reset vector at 0x16111
SPM: prepare to jump to Non-Secure image.
ASSERTION FAIL [i &amp;lt; 8] @ WEST_TOPDIR/nrf/drivers/serial/uart_nrf_sw_lpuart.c:412
        Used channel not found
[00:00:00.000,244] &amp;lt;err&amp;gt; board_control: Could not get GPIO Device Binding
[00:00:00.012,176] &amp;lt;err&amp;gt; os: r0/a1:  0x00000004  r1/a2:  0x0000019c  r2/a3:  0x0                                                                                                             0000001
[00:00:00.012,207] &amp;lt;err&amp;gt; os: r3/a4:  0x00000018 r12/ip:  0x00004000 r14/lr:  0x0                                                                                                             001a4e7
[00:00:00.012,207] &amp;lt;err&amp;gt; os:  xpsr:  0x41000000
[00:00:00.012,237] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x000210b8
[00:00:00.012,268] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
[00:00:00.012,268] &amp;lt;err&amp;gt; os: Current thread: 0x20010460 (unknown)
▒E: Could not get GPIO Device Binding Resetting system
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Tim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART problem NRF9160(Icarus) to ESP8266</title><link>https://devzone.nordicsemi.com/thread/317273?ContentTypeID=1</link><pubDate>Fri, 25 Jun 2021 14:29:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8802107-2878-41b6-bdca-2f65edb292fb</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I just tested it with NCS v1.6.0 and it worked fine. I did the following changes to enable logging:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/compare/nrfconnect:7a076c2...simon-iversen:060b624"&gt;https://github.com/nrfconnect/sdk-nrf/compare/nrfconnect:7a076c2...simon-iversen:060b624&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I connected P0.10 to P0.11 and P0.12 to P0.13, programmed it and got the following otuput:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
[00:00:01.349,731] &amp;lt;inf&amp;gt; app: Tx sent 5 bytes
[00:00:01.350,433] &amp;lt;inf&amp;gt; app: Received data 5 bytes
[00:00:01.850,372] &amp;lt;inf&amp;gt; app: Received data 1 bytes
[00:00:01.950,439] &amp;lt;inf&amp;gt; app: Tx sent 5 bytes
[00:00:01.951,141] &amp;lt;inf&amp;gt; app: Received data 5 bytes
[00:00:02.451,049] &amp;lt;inf&amp;gt; app: Received data 1 bytes
[00:00:02.551,147] &amp;lt;inf&amp;gt; app: Tx sent 5 bytes
[00:00:02.551,818] &amp;lt;inf&amp;gt; app: Received data 5 bytes
[00:00:03.051,788] &amp;lt;inf&amp;gt; app: Received data 1 bytes
[00:00:03.151,855] &amp;lt;inf&amp;gt; app: Tx sent 5 bytes
[00:00:03.152,557] &amp;lt;inf&amp;gt; app: Received data 5 bytes
[00:00:03.652,465] &amp;lt;inf&amp;gt; app: Received data 1 bytes
[00:00:03.752,593] &amp;lt;inf&amp;gt; app: Tx sent 5 bytes
[00:00:03.753,265] &amp;lt;inf&amp;gt; app: Received data 5 bytes
[00:00:04.253,204] &amp;lt;inf&amp;gt; app: Received data 1 bytes
[00:00:04.353,302] &amp;lt;inf&amp;gt; app: Tx sent 5 bytes&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Try the same and see if you&amp;#39;re able to get it to work. By the way, the sample does not support the board nrf9160dk_nrf9160&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;ns&lt;/strong&gt;&lt;/span&gt;, so you have to add it yourself here&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/v1.6.0/samples/peripheral/lpuart/boards"&gt;https://github.com/nrfconnect/sdk-nrf/tree/v1.6.0/samples/peripheral/lpuart/boards&lt;/a&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: UART problem NRF9160(Icarus) to ESP8266</title><link>https://devzone.nordicsemi.com/thread/316708?ContentTypeID=1</link><pubDate>Wed, 23 Jun 2021 11:51:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15ebd4b3-b459-4d84-a0cb-6fee55acafc7</guid><dc:creator>Lemmiwink</dc:creator><description>&lt;p&gt;This sample just print out: &amp;quot;E: could not get GPIO Device Binding&amp;quot; and then it ends. if I set&amp;nbsp; CONFIG_NRF_SW_LPUART_INT_DRIVEN=y, then it reboots everytime after the same error message. How can I send anything with that sample?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Tim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART problem NRF9160(Icarus) to ESP8266</title><link>https://devzone.nordicsemi.com/thread/316538?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 15:25:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91718edb-3616-4752-bc73-7491c9d6952a</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Check out the &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/9ea2e317406ba97f9be354a6f4c9fde9737ed866/samples/peripheral/lpuart/src/main.c"&gt;LPUART sample&lt;/a&gt;&amp;nbsp;and see if you&amp;#39;re able to communicate with the&amp;nbsp;&lt;span&gt;ESP8266 board.&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;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>