<?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 UART Communication to External MCU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86282/nrf9160-uart-communication-to-external-mcu</link><description>Hello, 
 
 We are trying to get UART communication between nRF9160 and MSP430. 
 
 MSP430 need to send out a sensor data through UART. 
 We are using 1.9.1 SDK, and Visual Studio as IDE. 
 
 The code gets caught up on &amp;quot;uart_irq_callback_set&amp;quot;, and reboots</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Apr 2022 19:26:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86282/nrf9160-uart-communication-to-external-mcu" /><item><title>RE: nRF9160 UART Communication to External MCU</title><link>https://devzone.nordicsemi.com/thread/362915?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 19:26:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ac2c6ca-2e4d-43ad-bdd2-0914d8dce94c</guid><dc:creator>Tazik892</dc:creator><description>&lt;p&gt;I should add that the error with uart_irq_rx_enable only occurs when we are actively transmitting to the nrf9160. Therefore, there is probably some issue with how we are handling the interrupt. It&amp;#39;s not possible to determine this through debugging as far as I can tell since every time the Zephyr OS reboots, it eliminates the record of printed debug statements. Is there any way to overcome this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UART Communication to External MCU</title><link>https://devzone.nordicsemi.com/thread/362914?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 17:44:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8de8e2bc-08b7-4b43-88d3-9b91970e62a2</guid><dc:creator>Tazik892</dc:creator><description>&lt;p&gt;Hey, thanks for the help. We used the project you provided as a baseline and by adding the necessary interrupt handling functions one by one discovered that the issue was not with the callback function in particular but rather with the uart_irq_rx_enable function. Again, the issue is a continuous reboot of the Zephyr RTOS if this function is present at all. The runtime does not even enter main if this function is present, whereas if it is not present, everything executes.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img alt="Output with no interrupt enable" src="https://devzone.nordicsemi.com/resized-image/__size/960x720/__key/communityserver-discussions-components-files/4/0411a.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Above is the output without the uart_irq_rx_enable line. Notice the good behavior of both debug messages being printed and no unintended Zephyr reboots.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/960x720/__key/communityserver-discussions-components-files/4/0411b.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Above is the output with the uart_irq_rx_enable line. Notice that the debug text indicating main() has been entered is never printed, but instead Zephyr simply reboots again.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/960x720/__key/communityserver-discussions-components-files/4/0411c.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Finally, above is the updated code based on the example you&amp;#39;ve sent. Using the example as provided did not actually include any means of handling interrupts; therefore, we had to add a few functions to get any use out of the project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UART Communication to External MCU</title><link>https://devzone.nordicsemi.com/thread/361871?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2022 13:39:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fece1652-cd57-42ba-a0de-abc68018b1ec</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi, sorry for the late reply&lt;/p&gt;
&lt;p&gt;It seems to work fine for me. Take a look at this and see if it helps you spot the issue. Might be the callback function.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1072.uart_5F00_test.zip"&gt;devzone.nordicsemi.com/.../1072.uart_5F00_test.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UART Communication to External MCU</title><link>https://devzone.nordicsemi.com/thread/360618?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2022 19:52:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e2c0db0-a1fe-43ea-968c-6b141944544d</guid><dc:creator>Tazik892</dc:creator><description>&lt;p&gt;Hello, we tried that, and switched pins, but it still gets stacked at the exactly the same spot.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UART Communication to External MCU</title><link>https://devzone.nordicsemi.com/thread/360541?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2022 12:39:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5634c0b1-9061-49c9-9029-6de5aeb2f54d</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Can you try using uart2 instead, with the default pins of P0.23 and P0.24?&lt;/p&gt;
&lt;p&gt;Also add this to your overlay file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2c2 {
	status = &amp;quot;disabled&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UART Communication to External MCU</title><link>https://devzone.nordicsemi.com/thread/360317?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 13:01:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03bf7b68-af5a-48d2-b347-c6991aea5d65</guid><dc:creator>Tazik892</dc:creator><description>&lt;p&gt;Hello, sorry I copied a wrong thing... We used pins 0.10 and 0.11. I tried 0.28 and 0.29 and it still didnt work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UART Communication to External MCU</title><link>https://devzone.nordicsemi.com/thread/360186?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 08:17:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2788c4d-1cf4-45c3-ba89-04aed94e5792</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Try using other pins for the UART, as P0.00 and P0.01 are used for the 32.768 kHz crystal by default. For example, try setting the pins to 28 and 29, which correspond to P0.28 and P0.29.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>