<?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>Problem uart communication with microcontroller nRF 51 DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30601/problem-uart-communication-with-microcontroller-nrf-51-dk</link><description>Hello, 
 if I send a byte over uart to an device (e.g. gps -logger), the same byte will printed to the terminal (e.g. Putty or Termite). 
 If I get a byte from the micro-controller, so it will printed to the terminal and to the micro-controller. 
 It</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Feb 2018 11:50:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30601/problem-uart-communication-with-microcontroller-nrf-51-dk" /><item><title>RE: Problem uart communication with microcontroller nRF 51 DK</title><link>https://devzone.nordicsemi.com/thread/121237?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2018 11:50:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a47b9a7-fa62-4ad7-94af-c9bc48d41f85</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It sounds like you need two UARTs. One for your&amp;nbsp;MCU and the other for your terminal. You cannot hook both the MCU and the terminal to the same UART and expect the terminal to print only the answers.&lt;/p&gt;
&lt;p&gt;Unfortunately the nRF51 only has one UART, but luckily it is possible to reconfigure it at run-time. So you can:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Connect your MCU to a sepparate set of GPIO pins.&lt;/li&gt;
&lt;li&gt;Configure the UART to use these pins when transferring data to the MCU.&lt;/li&gt;
&lt;li&gt;Send your commands to your MCU and get the response back.&lt;/li&gt;
&lt;li&gt;Reconfigure the UART pins to connect the terminal.&lt;/li&gt;
&lt;li&gt;Send your data to the terminal.&lt;/li&gt;
&lt;li&gt;Repeat....&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The nRF52 has two UART instances, so if you are willing to move from nRF51 you don&amp;#39;t need to change the UART configuration back and forth all the time.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>