<?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>Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73586/communication-between-nrf52840-and-nrf9160-on-thingy-91</link><description>Hei I am trying to make SPI or UART communication between nrf9160 and nrf52840 on thingy 91....... i need to send data from nrf52840 to nrf9160(i will use and print the data) what is the best way to do it? I tried connectivity bridge, but with no hope</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Apr 2025 18:18:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73586/communication-between-nrf52840-and-nrf9160-on-thingy-91" /><item><title>RE: Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/thread/531429?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 18:18:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cf2fb07-3d04-44c1-bad5-ea6f67edf283</guid><dc:creator>Felipe Santos</dc:creator><description>&lt;div id="tw-target-text-container" class="tw-ta-container tw-nfl"&gt;
&lt;pre id="tw-target-text" class="tw-data-text tw-text-large tw-ta" dir="ltr" data-placeholder="Tradu&amp;ccedil;&amp;atilde;o" data-ved="2ahUKEwiC1JLlic6MAxVnL7kGHSv0Ct8Q3ewLegQICBAV"&gt;&lt;span class="Y2IQFc" lang="en"&gt;Hello, could you show me the code for both boards?&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div id="tw-target-rmn-container" class="tw-target-rmn tw-ta-container tw-nfl"&gt;
&lt;pre id="tw-target-rmn" class="tw-data-placeholder tw-text-small tw-ta" dir="ltr" data-placeholder=""&gt;&lt;span class="Y2IQFc"&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="iYB33c"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/thread/305126?ContentTypeID=1</link><pubDate>Thu, 15 Apr 2021 13:31:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4527c453-75ef-4266-b1f7-c6fdc6ec0852</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p&gt;Normally, it doesn’t make any difference what kind of device the nRF is communicating with, as long as the interface is set-up correctly.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Are you sure that the Arduino is transmitting the data correctly? Otherwise I would recommend to start with a simple UART application on the nRF52840 to make sure that it works as you desire.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/thread/305044?ContentTypeID=1</link><pubDate>Thu, 15 Apr 2021 10:18:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d1b3440-ae3f-41e0-9589-943d0d7af895</guid><dc:creator>Hamada888</dc:creator><description>&lt;p&gt;Hei&lt;br /&gt;&lt;br /&gt;i have now uart (uart_0)code on both nrf9160 and nrf52840 which communicating together&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;now I want to use another uart (uart_1) to connect nrf52840 with arduino UNO and get data from the arduino&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;i am using the same way I used between nrf9160 and nrf52840, but I didn&amp;#39;t get anything from arduino (I am just trying to send one byte there on arduino...... Serial.write(1);)&lt;br /&gt;&lt;br /&gt;do you have any example or tickets which I can take a look to?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I am using lpuart code on thingy 91 (nrf52840)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/thread/304809?ContentTypeID=1</link><pubDate>Wed, 14 Apr 2021 12:19:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54703cc2-3fa0-4104-ac98-dfc66a8ada08</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p&gt;Hello Mohammad,&lt;/p&gt;
&lt;p&gt;again, sorry for the delay! Unfortunately I wasn’t able to reproduce the behaviour in my application. Could you please share your application?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/thread/304341?ContentTypeID=1</link><pubDate>Mon, 12 Apr 2021 14:44:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8550d6f7-0b2a-4fd0-97e9-bf8d4fb5d6a7</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p&gt;Thanks for you answer, Mohammad! I’m sorry for the delay, but we have a lot of cases right now. I will come back to you as soon as possible.&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;p&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/thread/303998?ContentTypeID=1</link><pubDate>Fri, 09 Apr 2021 12:05:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:292c4730-ed45-488d-b624-96f56e48e8ce</guid><dc:creator>Hamada888</dc:creator><description>&lt;p&gt;&lt;br /&gt;#define BUF_SIZE 64&lt;br /&gt;static K_MEM_SLAB_DEFINE(uart_slab, BUF_SIZE, 3, 4);&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;static void uart_irq_handler(const struct device *dev, void *context)&lt;br /&gt;{&lt;br /&gt; uint8_t buf[] = {1, 2, 3, 4, 5};&lt;/p&gt;
&lt;p&gt;if (uart_irq_tx_ready(dev)) {&lt;br /&gt; (void)uart_fifo_fill(dev, buf, sizeof(buf));&lt;br /&gt; uart_irq_tx_disable(dev);&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;if (uart_irq_rx_ready(dev)) {&lt;br /&gt; uint8_t buf[10];&lt;br /&gt; int len = uart_fifo_read(dev, buf, sizeof(buf));&lt;/p&gt;
&lt;p&gt;if (len) {&lt;br /&gt; printk(&amp;quot;read %d bytes\n&amp;quot;, len);&lt;br /&gt; }&lt;br /&gt; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;static void interrupt_driven(const struct device *dev)&lt;br /&gt;{&lt;br /&gt; uint8_t c = 0xff;&lt;/p&gt;
&lt;p&gt;uart_irq_callback_set(dev, uart_irq_handler);&lt;br /&gt; uart_irq_rx_enable(dev);&lt;br /&gt; while (1) {&lt;br /&gt; uart_irq_tx_enable(dev);&lt;br /&gt; k_sleep(K_MSEC(500));&lt;/p&gt;
&lt;p&gt;uart_poll_out(dev, c);&lt;br /&gt; k_sleep(K_MSEC(100));&lt;br /&gt; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;static void uart_callback(const struct device *dev,&lt;br /&gt; struct uart_event *evt,&lt;br /&gt; void *user_data)&lt;br /&gt;{&lt;br /&gt; struct device *uart = user_data;&lt;br /&gt; int err;&lt;/p&gt;
&lt;p&gt;switch (evt-&amp;gt;type) {&lt;br /&gt; case UART_TX_DONE:&lt;br /&gt; LOG_INF(&amp;quot;Tx sent %d bytes&amp;quot;, evt-&amp;gt;data.tx.len);&lt;br /&gt; break;&lt;/p&gt;
&lt;p&gt;case UART_TX_ABORTED:&lt;br /&gt; LOG_ERR(&amp;quot;Tx aborted&amp;quot;);&lt;br /&gt; break;&lt;/p&gt;
&lt;p&gt;case UART_RX_RDY:&lt;br /&gt; LOG_INF(&amp;quot;Received data %d bytes&amp;quot;, evt-&amp;gt;data.rx.len);&lt;br /&gt; break;&lt;/p&gt;
&lt;p&gt;case UART_RX_BUF_REQUEST:&lt;br /&gt; {&lt;br /&gt; uint8_t *buf;&lt;/p&gt;
&lt;p&gt;err = k_mem_slab_alloc(&amp;amp;uart_slab, (void **)&amp;amp;buf, K_NO_WAIT);&lt;br /&gt; __ASSERT(err == 0, &amp;quot;Failed to allocate slab&amp;quot;);&lt;/p&gt;
&lt;p&gt;err = uart_rx_buf_rsp(uart, buf, BUF_SIZE);&lt;br /&gt; __ASSERT(err == 0, &amp;quot;Failed to provide new buffer&amp;quot;);&lt;br /&gt; break;&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;case UART_RX_BUF_RELEASED:&lt;br /&gt; k_mem_slab_free(&amp;amp;uart_slab, (void **)&amp;amp;evt-&amp;gt;data.rx_buf.buf);&lt;br /&gt; break;&lt;/p&gt;
&lt;p&gt;case UART_RX_DISABLED:&lt;br /&gt; break;&lt;/p&gt;
&lt;p&gt;case UART_RX_STOPPED:&lt;br /&gt; break;&lt;br /&gt; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;static void async(const struct device *uart0_dev)&lt;br /&gt;{&lt;br /&gt; uint8_t txbuf[5] = {1, 2, 3, 4, 5};&lt;br /&gt; int err;&lt;br /&gt; uint8_t *buf;&lt;/p&gt;
&lt;p&gt;err = k_mem_slab_alloc(&amp;amp;uart_slab, (void **)&amp;amp;buf, K_NO_WAIT);&lt;br /&gt; __ASSERT(err == 0, &amp;quot;Failed to alloc slab&amp;quot;);&lt;/p&gt;
&lt;p&gt;err = uart_callback_set(uart0_dev, uart_callback, (void *)uart0_dev);&lt;br /&gt; __ASSERT(err == 0, &amp;quot;Failed to set callback&amp;quot;);&lt;/p&gt;
&lt;p&gt;err = uart_rx_enable(uart0_dev, buf, BUF_SIZE, 10);&lt;br /&gt; __ASSERT(err == 0, &amp;quot;Failed to enable RX&amp;quot;);&lt;/p&gt;
&lt;p&gt;while (1) {&lt;br /&gt; err = uart_tx(uart0_dev, txbuf, sizeof(txbuf), 10);&lt;br /&gt; __ASSERT(err == 0, &amp;quot;Failed to initiate transmission&amp;quot;);&lt;/p&gt;
&lt;p&gt;k_sleep(K_MSEC(500));&lt;/p&gt;
&lt;p&gt;uart_poll_out(uart0_dev, txbuf[0]);&lt;br /&gt; k_sleep(K_MSEC(100));&lt;br /&gt; }&lt;br /&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/thread/303997?ContentTypeID=1</link><pubDate>Fri, 09 Apr 2021 12:04:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:182665e8-c711-4fca-bdbe-1e04e996ae6f</guid><dc:creator>Hamada888</dc:creator><description>&lt;p&gt;yes.... all the code is in main.c&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/thread/303996?ContentTypeID=1</link><pubDate>Fri, 09 Apr 2021 12:01:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51fd5c1c-a20c-49b2-b396-0aef32331473</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>[quote user="Hamada888"]but i get another feil (Failed to set callback)&amp;nbsp;[/quote]
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Have you defined a callback function in main.c, as shown below from the LPUART sample?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void uart_callback(const struct device *dev,
			  struct uart_event *evt,
			  void *user_data)
{
	struct device *uart = user_data;
	int err;

	switch (evt-&amp;gt;type) {
	case UART_TX_DONE:
		LOG_INF(&amp;quot;Tx sent %d bytes&amp;quot;, evt-&amp;gt;data.tx.len);
		break;

	case UART_TX_ABORTED:
		LOG_ERR(&amp;quot;Tx aborted&amp;quot;);
		break;

	case UART_RX_RDY:
		LOG_INF(&amp;quot;Received data %d bytes&amp;quot;, evt-&amp;gt;data.rx.len);
		break;

	case UART_RX_BUF_REQUEST:
	{
		uint8_t *buf;

		err = k_mem_slab_alloc(&amp;amp;uart_slab, (void **)&amp;amp;buf, K_NO_WAIT);
		__ASSERT(err == 0, &amp;quot;Failed to allocate slab&amp;quot;);

		err = uart_rx_buf_rsp(uart, buf, BUF_SIZE);
		__ASSERT(err == 0, &amp;quot;Failed to provide new buffer&amp;quot;);
		break;
	}

	case UART_RX_BUF_RELEASED:
		k_mem_slab_free(&amp;amp;uart_slab, (void **)&amp;amp;evt-&amp;gt;data.rx_buf.buf);
		break;

	case UART_RX_DISABLED:
		break;

	case UART_RX_STOPPED:
		break;
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;p&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/thread/303988?ContentTypeID=1</link><pubDate>Fri, 09 Apr 2021 11:50:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c377085f-cccf-48a9-b26c-2cc157c7d8d7</guid><dc:creator>Hamada888</dc:creator><description>&lt;p&gt;Thanks for your answer&amp;nbsp;&lt;br /&gt;now i dont get the same feil when i use&amp;nbsp;uart0_dev = device_get_binding(&amp;quot;UART_0&amp;quot;);&lt;br /&gt;&lt;br /&gt;but i get another feil (Failed to set callback)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;the code is:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;static void async(const struct device *uart0_dev)&lt;br /&gt;{&lt;br /&gt; uint8_t txbuf[5] = {1, 2, 3, 4, 5};&lt;br /&gt; int err;&lt;br /&gt; uint8_t *buf;&lt;/p&gt;
&lt;p&gt;err = k_mem_slab_alloc(&amp;amp;uart_slab, (void **)&amp;amp;buf, K_NO_WAIT);&lt;br /&gt; __ASSERT(err == 0, &amp;quot;Failed to alloc slab&amp;quot;);&lt;/p&gt;
&lt;p&gt;err = uart_callback_set(uart0_dev, uart_callback, (void *)uart0_dev);&lt;br /&gt; __ASSERT(err == 0, &amp;quot;Failed to set callback&amp;quot;);&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;err = uart_rx_enable(uart0_dev, buf, BUF_SIZE, 10);&lt;br /&gt; __ASSERT(err == 0, &amp;quot;Failed to enable RX&amp;quot;);&lt;/p&gt;
&lt;p&gt;while (1) {&lt;br /&gt; err = uart_tx(uart0_dev, txbuf, sizeof(txbuf), 10);&lt;br /&gt; __ASSERT(err == 0, &amp;quot;Failed to initiate transmission&amp;quot;);&lt;/p&gt;
&lt;p&gt;k_sleep(K_MSEC(500));&lt;/p&gt;
&lt;p&gt;uart_poll_out(uart0_dev, txbuf[0]);&lt;br /&gt; k_sleep(K_MSEC(100));&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;main function:&lt;/p&gt;
&lt;p&gt;void main(void)&lt;br /&gt;{&lt;br /&gt; LOG_INF(&amp;quot;Asset tracker started&amp;quot;);&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; const struct device *uart0_dev;&lt;/p&gt;
&lt;p&gt;k_msleep(1000);&lt;br /&gt; uart0_dev = device_get_binding(&amp;quot;UART_0&amp;quot;);&lt;br /&gt; //lpuart = device_get_binding(&amp;quot;LPUART&amp;quot;);&lt;br /&gt; __ASSERT(uart0_dev, &amp;quot;Failed to get the device&amp;quot;);&lt;/p&gt;
&lt;p&gt;if (IS_ENABLED(CONFIG_NRF_SW_LPUART_INT_DRIVEN)) {&lt;br /&gt; interrupt_driven(uart0_dev);&lt;br /&gt; } else {&lt;br /&gt; async(uart0_dev);&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I think the feil is from my overlay file:&lt;br /&gt;&lt;br /&gt;overlay file:&lt;br /&gt;&lt;br /&gt;&amp;amp;uart0 {&lt;br /&gt;compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;&lt;br /&gt;status = &amp;quot;okay&amp;quot;;&lt;br /&gt;rx-pin = &amp;lt;19&amp;gt;;&lt;br /&gt;tx-pin = &amp;lt;20&amp;gt;;&lt;br /&gt;baudrate = &amp;lt;1000000&amp;gt;;&lt;br /&gt;/delete-property/ rts-pin;&lt;br /&gt;/delete-property/ cts-pin;&lt;br /&gt;/delete-property/ hw-flow-control;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;prj.conf:&lt;br /&gt;&lt;br /&gt;i added to the original prj file&lt;/p&gt;
&lt;p&gt;CONFIG_UART_ASYNC_API=y&lt;br /&gt;&lt;br /&gt;thanks for your help&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Mohammad&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/thread/303970?ContentTypeID=1</link><pubDate>Fri, 09 Apr 2021 11:08:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55967f0c-f649-4d9a-af51-96a66c655ad4</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p&gt;Hello Mohammad,&lt;/p&gt;
&lt;p&gt;configuring the LPUART in the asset tracker application is unfortunately not that straight forward. But I’m not sure if you need that, actually.&lt;/p&gt;
&lt;p&gt;UART0 and 1 are already pre-configured in the asset tracker, so you could use them as they are (and of course modify them via an overlay-file). You just replace the argument in the get binding function, eg.:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uart0_dev = device_get_binding(&amp;quot;UART_0&amp;quot;);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;If you want to check the labels you can have a look at zephyr.dts in ../&amp;lt;your_build_folder&amp;gt;/zephyr.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Let me know if you have any more questions!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Markus&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/thread/303758?ContentTypeID=1</link><pubDate>Thu, 08 Apr 2021 12:06:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72d00226-ad16-423e-8740-ee7e6f825055</guid><dc:creator>Hamada888</dc:creator><description>&lt;p&gt;thanks again for your answer&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;i am trying now lpuart with asset tracker........... i copied lpuart code into asset tracker......... i get feil (&amp;quot;Failed to get the device&amp;quot;) .................&lt;/p&gt;
&lt;p&gt;in main function I have:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;lpuart = device_get_binding(&amp;quot;LPUART&amp;quot;);&lt;br /&gt; __ASSERT(lpuart, &amp;quot;Failed to get the device&amp;quot;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;thingy91_nrf9160ns.overlay:&lt;/p&gt;
&lt;p&gt;&amp;amp;uart1 {&lt;br /&gt; compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;&lt;br /&gt; status = &amp;quot;okay&amp;quot;;&lt;br /&gt; rx-pin = &amp;lt;44&amp;gt;;&lt;br /&gt; tx-pin = &amp;lt;45&amp;gt;;&lt;br /&gt; baudrate = &amp;lt;1000000&amp;gt;;&lt;br /&gt; /delete-property/ rts-pin;&lt;br /&gt; /delete-property/ cts-pin;&lt;br /&gt; /delete-property/ hw-flow-control;&lt;/p&gt;
&lt;p&gt;lpuart: nrf-sw-lpuart {&lt;br /&gt; compatible = &amp;quot;nordic,nrf-sw-lpuart&amp;quot;;&lt;br /&gt; status = &amp;quot;okay&amp;quot;;&lt;br /&gt; label = &amp;quot;LPUART&amp;quot;;&lt;br /&gt; req-pin = &amp;lt;46&amp;gt;;&lt;br /&gt; rdy-pin = &amp;lt;47&amp;gt;;&lt;br /&gt; };&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;prj.conf:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;#&lt;br /&gt;# Copyright (c) 2019 Nordic Semiconductor ASA&lt;br /&gt;#&lt;br /&gt;# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause&lt;br /&gt;#&lt;br /&gt;# General config&lt;br /&gt;CONFIG_NEWLIB_LIBC=y&lt;br /&gt;CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y&lt;br /&gt;CONFIG_ASSERT=y&lt;br /&gt;CONFIG_REBOOT=y&lt;br /&gt;CONFIG_LOG=y&lt;br /&gt;CONFIG_LOG_IMMEDIATE=y&lt;/p&gt;
&lt;p&gt;# Network&lt;br /&gt;CONFIG_NETWORKING=y&lt;br /&gt;CONFIG_NET_NATIVE=n&lt;br /&gt;CONFIG_NET_SOCKETS=y&lt;br /&gt;CONFIG_NET_SOCKETS_OFFLOAD=y&lt;/p&gt;
&lt;p&gt;# LTE link control&lt;br /&gt;CONFIG_POWER_OPTIMIZATION_ENABLE=n&lt;br /&gt;CONFIG_LTE_LINK_CONTROL=y&lt;br /&gt;CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y&lt;br /&gt;CONFIG_LTE_AUTO_INIT_AND_CONNECT=n&lt;/p&gt;
&lt;p&gt;CONFIG_LTE_NETWORK_MODE_NBIOT_GPS=n&lt;br /&gt;CONFIG_LTE_LEGACY_PCO_MODE=n&lt;br /&gt;CONFIG_LTE_PSM_REQ_RPTAU=&amp;quot;00000110&amp;quot;&lt;br /&gt;CONFIG_LTE_PSM_REQ_RAT=&amp;quot;00000010&amp;quot;&lt;/p&gt;
&lt;p&gt;# Modem info&lt;br /&gt;CONFIG_MODEM_INFO=y&lt;br /&gt;CONFIG_MODEM_INFO_ADD_DATE_TIME=n&lt;/p&gt;
&lt;p&gt;# Modem library&lt;br /&gt;CONFIG_NRF_MODEM_LIB=y&lt;br /&gt;CONFIG_NRF_MODEM_LIB_TRACE_ENABLED=n&lt;/p&gt;
&lt;p&gt;# nRF Cloud&lt;br /&gt;CONFIG_CLOUD_API=y&lt;br /&gt;CONFIG_NRF_CLOUD=y&lt;br /&gt;CONFIG_NRF_CLOUD_LOG_LEVEL_DBG=y&lt;br /&gt;CONFIG_NRF_CLOUD_AGPS=y&lt;br /&gt;CONFIG_NRF_CLOUD_CONNECTION_POLL_THREAD=y&lt;br /&gt;CONFIG_NRF_CLOUD_SEND_TIMEOUT=y&lt;br /&gt;CONFIG_NRF_CLOUD_SEND_TIMEOUT_SEC=60&lt;br /&gt;CONFIG_NRF_CLOUD_FOTA_LOG_LEVEL_DBG=y&lt;br /&gt;# nRF Cloud FOTA download configuration&lt;br /&gt;CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096&lt;br /&gt;# Needed for the cloud codec&lt;br /&gt;CONFIG_CJSON_LIB=y&lt;br /&gt;# Shorter to prevent NAT timeouts&lt;br /&gt;CONFIG_MQTT_KEEPALIVE=120&lt;br /&gt;# Don&amp;#39;t resubscribe to topics if broker remembers them&lt;br /&gt;CONFIG_MQTT_CLEAN_SESSION=n&lt;/p&gt;
&lt;p&gt;# Sensors&lt;br /&gt;CONFIG_ACCEL_USE_SIM=y&lt;br /&gt;CONFIG_TEMP_USE_SIM=y&lt;br /&gt;CONFIG_CLOUD_BUTTON=n&lt;/p&gt;
&lt;p&gt;# GPS&lt;br /&gt;CONFIG_NRF9160_GPS=y&lt;br /&gt;# CONFIG_GPS_USE_SIM=y&lt;br /&gt;CONFIG_NRF9160_GPS_LOG_LEVEL_DBG=y&lt;br /&gt;CONFIG_GPS_USE_EXTERNAL=y&lt;br /&gt;CONFIG_GPS_DEV_NAME=&amp;quot;NRF9160_GPS&amp;quot;&lt;br /&gt;CONFIG_GPS_CONTROL_PSM_ENABLE_ON_START=y&lt;/p&gt;
&lt;p&gt;CONFIG_GPS_CONTROL_FIRST_FIX_CHECK_DELAY=10&lt;br /&gt;CONFIG_GPS_CONTROL_FIX_CHECK_INTERVAL=30&lt;br /&gt;CONFIG_GPS_CONTROL_FIX_TRY_TIME=360&lt;br /&gt;CONFIG_GPS_CONTROL_PSM_DISABLE_ON_STOP=n&lt;br /&gt;CONFIG_AGPS=y&lt;/p&gt;
&lt;p&gt;# Library for buttons and LEDs&lt;br /&gt;CONFIG_DK_LIBRARY=y&lt;br /&gt;CONFIG_DK_LIBRARY_INVERT_LEDS=n&lt;/p&gt;
&lt;p&gt;# Library that maintains the current date time UTC.&lt;br /&gt;CONFIG_DATE_TIME=y&lt;/p&gt;
&lt;p&gt;# Console&lt;br /&gt;CONFIG_CONSOLE_SUBSYS=y&lt;br /&gt;CONFIG_CONSOLE_HANDLER=y&lt;br /&gt;CONFIG_CONSOLE_GETCHAR=y&lt;/p&gt;
&lt;p&gt;# Heap and stacks&lt;br /&gt;CONFIG_HEAP_MEM_POOL_SIZE=16384&lt;br /&gt;CONFIG_MAIN_STACK_SIZE=8192&lt;br /&gt;CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048&lt;/p&gt;
&lt;p&gt;# Settings&lt;br /&gt;CONFIG_FLASH=y&lt;br /&gt;CONFIG_FLASH_PAGE_LAYOUT=y&lt;br /&gt;CONFIG_FLASH_MAP=y&lt;br /&gt;CONFIG_FCB=y&lt;br /&gt;CONFIG_SETTINGS=y&lt;br /&gt;CONFIG_SETTINGS_FCB=y&lt;br /&gt;CONFIG_MPU_ALLOW_FLASH_WRITE=y&lt;/p&gt;
&lt;p&gt;# MCUBOOT&lt;br /&gt;CONFIG_BOOTLOADER_MCUBOOT=y&lt;br /&gt;CONFIG_IMG_MANAGER=y&lt;br /&gt;CONFIG_MCUBOOT_IMG_MANAGER=y&lt;br /&gt;CONFIG_IMG_ERASE_PROGRESSIVELY=y&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;CONFIG_CONSOLE=n&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// this one from lpuart sample&lt;br /&gt;CONFIG_UART_CONSOLE=n&lt;br /&gt;CONFIG_NRF_SW_LPUART=y&lt;/p&gt;
&lt;p&gt;# Fatal error&lt;br /&gt;CONFIG_RESET_ON_FATAL_ERROR=n&lt;br /&gt;CONFIG_WATCHDOG=y&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;how to fix it? i need to use uart to connect to nrf52840&lt;br /&gt;&lt;br /&gt;Mohammad&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/thread/303458?ContentTypeID=1</link><pubDate>Wed, 07 Apr 2021 11:32:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e140264b-5e94-4dde-9a95-e557b189023a</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="Hamada888"]1-&lt;br /&gt;I see that i can use MCU_IF to communicate between nrf91 and nrf52840, and I road that the connectivity bridge has already done it (if i don&amp;#39;t misunderstand it) ....but how/ where I will write my code? do you have an example for UART functions? write and read? all I need for now is to send one string between nrf91 and nrf52840 and print it out to putty&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I am using the connectivity bridge on nrf52840 and the asset tracker on nrf9160[/quote]
&lt;p&gt;How and where to write the code is up to your requirements and needs. In general, you have to add/modify both the asset tracker and connectivity bridge application to handle the data which is transmitted between the units. As an example for how to set up an UART communication, you can have a look here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.0/nrf/samples/peripheral/lpuart/README.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.0/nrf/samples/peripheral/lpuart/README.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The connectivity bridge application already has UART code implemented, which could be a good entry point.&lt;/p&gt;
[quote user="Hamada888"]2-&lt;br /&gt;I tried&amp;nbsp;&lt;span&gt;CONFIG_RTT_CONSOLE=y on my prj.conf but i still don&amp;#39;t get any output, is there anything else i can enable/disable to fix it?&lt;/span&gt;[/quote]
&lt;p&gt;I’m not sure if PuTTY is supporting RTT. Anyway, you can have a look at this guideline:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.0/zephyr/guides/tools/nordic_segger.html#rtt-console"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.0/zephyr/guides/tools/nordic_segger.html#rtt-console&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I hope this will help you.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;p&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/thread/303275?ContentTypeID=1</link><pubDate>Tue, 06 Apr 2021 16:10:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfbbb0e9-6a7c-4409-8861-c0614924977c</guid><dc:creator>Hamada888</dc:creator><description>&lt;p&gt;hei&lt;br /&gt;Thanks for your answer&lt;/p&gt;
&lt;p&gt;1-&lt;br /&gt;I see that i can use MCU_IF to communicate between nrf91 and nrf52840, and I road that the connectivity bridge has already done it (if i don&amp;#39;t misunderstand it) ....but how/ where I will write my code? do you have an example for UART functions? write and read? all I need for now is to send one string between nrf91 and nrf52840 and print it out to putty&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I am using the connectivity bridge on nrf52840 and the asset tracker on nrf9160&lt;br /&gt;&lt;br /&gt;2-&lt;br /&gt;I tried&amp;nbsp;&lt;span&gt;CONFIG_RTT_CONSOLE=y on my prj.conf but i still don&amp;#39;t get any output, is there anything else i can enable/disable to fix it?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Communication between nrf52840 and nrf9160 on thingy 91</title><link>https://devzone.nordicsemi.com/thread/303231?ContentTypeID=1</link><pubDate>Tue, 06 Apr 2021 14:41:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c1b2ab6-3ada-4514-bfd8-06af98e1bb3a</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p&gt;Hello Mohammad,&lt;/p&gt;
&lt;p&gt;you can communicate between the nRF9160 and nRF52840 on the Thingy:91 using MCU_IF.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.nordicsemi.com/-/media/Software-and-other-downloads/Dev-Kits/Thingy91/Hardware-files/Thingy91---Hardware-files-1_5_0.zip"&gt;https://www.nordicsemi.com/-/media/Software-and-other-downloads/Dev-Kits/Thingy91/Hardware-files/Thingy91---Hardware-files-1_5_0.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Have a look at “PCA20035_Schematic_And_PCB.pdf” page 2 (nRF91 GPIO pin mapping) &amp;amp; 3 (nRF52 GPIO pin mapping). The instances UART0 and UART1 on both sides are already pre-configured to communicate with each other.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Another small question....i cannot get any thing out on putty when i write printk(&amp;quot;hello world&amp;quot;); in the main function in connectivity bridge code ...how to fix it?[/quote]
&lt;p&gt;In the file ../build/zephyr/zephyr.dts you can see that UART0 is used to write to the console. But since the connectivity bridge application doesn’t have a “connectivity bridge” for its own console data, it will not be transmitted from the nRF52840 via USB. Alternatively, you can use RTT to read printk commandos by setting &lt;span&gt;&lt;span&gt;CONFIG_RTT_CONSOLE=y &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;in prj.conf.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Cheers!&lt;/p&gt;
&lt;p&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>