<?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>Example serial_uartes does not work in SDK 15.3</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52834/example-serial_uartes-does-not-work-in-sdk-15-3</link><description>Hello, 
 I am in the process of integrating a project where I need 3 uarts to work concurrently in different configurations. This will eventually migrate to an application where the nrf52840 will also serve as a beacon. 
 I have individually proven I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Nov 2019 07:42:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52834/example-serial_uartes-does-not-work-in-sdk-15-3" /><item><title>RE: Example serial_uartes does not work in SDK 15.3</title><link>https://devzone.nordicsemi.com/thread/221219?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2019 07:42:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6cef4d0-7ab8-466f-ae09-ec11e5bf5de6</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Gary&lt;/p&gt;
&lt;p&gt;Sorry to hear that, I will consider the case closed then.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hopefully you will still keep us in mind for future projects ;)&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example serial_uartes does not work in SDK 15.3</title><link>https://devzone.nordicsemi.com/thread/221179?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2019 01:04:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd3c0d2d-20cb-4bea-a8bf-bd2f9ad5a1fc</guid><dc:creator>GaryD</dc:creator><description>&lt;p&gt;Hi &lt;span&gt;Torbj&amp;oslash;rn&lt;/span&gt;,&lt;/p&gt;
&lt;p&gt;Unfortunately I had to move on to implement a different solution outside of Nordic.&amp;nbsp; My customer was not patient and this issue was not resolved in time.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;GaryD&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example serial_uartes does not work in SDK 15.3</title><link>https://devzone.nordicsemi.com/thread/215263?ContentTypeID=1</link><pubDate>Wed, 16 Oct 2019 11:21:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b249b2a-18db-4ee3-afbf-d21f446f3133</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Gary&lt;/p&gt;
&lt;p&gt;Sorry for the slow response, I have been out on travel for a while.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yes, you should be able to dynamically re-allocate one hardware UART interface to two separate UART busses, as long as you only have to use one of them at a time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The flush operation allows you simulate a blocking UART write.&amp;nbsp;A call to the flush function will not return until either the TX buffers are empty or the timeout is reached, which is good if you need to delay the code execution until the UART is done writing.&amp;nbsp;&lt;br /&gt;It is not necessary to call this operation for the UART TX to start, and for most applications I would not expect this function to be necessary.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I made a quick modification to the serial example to implement the event handler, and you will find the main file attached:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-bcd7b1d14f4342bc823557be599f417f/main.c"&gt;devzone.nordicsemi.com/.../main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example serial_uartes does not work in SDK 15.3</title><link>https://devzone.nordicsemi.com/thread/213504?ContentTypeID=1</link><pubDate>Sun, 06 Oct 2019 04:21:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e81704b4-55ac-42c6-91ce-3bf3b69aaf69</guid><dc:creator>GaryD</dc:creator><description>&lt;p&gt;I have thought of both options you mentioned but would like to minimize the need for external components at this time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example serial_uartes does not work in SDK 15.3</title><link>https://devzone.nordicsemi.com/thread/213503?ContentTypeID=1</link><pubDate>Sun, 06 Oct 2019 04:20:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd3b625a-1551-4a3f-874b-d3d6763eafb9</guid><dc:creator>GaryD</dc:creator><description>&lt;p&gt;Thank you Torbjorn,&lt;/p&gt;
&lt;p&gt;I worked through the corrections to the example mentioned above and have both UARTES working now.&amp;nbsp; That particular example uses polling.&amp;nbsp; Do you have and example UARTE receive handler that I could review.&amp;nbsp; I need to save the incoming stream of characters until I see a line termination (\r or \n) and then parse the line of data.&amp;nbsp; My application is low power so I cannot poll like the examples show.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When I get to the requirement for the third serial line i will look at your suggestion for an additional UART function.&amp;nbsp; However, I can currently convert one of my serial interfaces into a TWI interface (the peripheral can handle either case but the manufacturer&amp;#39;s examples use the UART functionality).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I also plan to investigate deactivating one of the serials and activating it to my screen UART when I need to send data out of the port for&amp;nbsp;display.&amp;nbsp; I can also do the same when I need to poll the screen for any fault information.&amp;nbsp; I believe I can just flip back and forth with different I/O lines by de-activating from one peripheral and activating on another.&amp;nbsp; Do you agree?&lt;/p&gt;
&lt;p&gt;Would you mind clarifying what the purpose of the flush operation is for?&amp;nbsp; I cannot seem to find any documentation on it and I want to better understand it.&amp;nbsp; If I do not void the call for the flush, I sometimes get 0x0d errors (timeouts) on the flush operation.&amp;nbsp; If I just void it, it does not cause any issues but I would like to better understand why it is needed for every transaction with the serial UARTE transmit operation.&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;GaryD&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example serial_uartes does not work in SDK 15.3</title><link>https://devzone.nordicsemi.com/thread/213368?ContentTypeID=1</link><pubDate>Fri, 04 Oct 2019 10:43:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a61f085-dd02-4dd0-9d45-ce144e52548c</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;another option is to use an external UART chip - they are available with I2C and SPI interfaces - or, perhaps even a separate (small) microcontroller ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example serial_uartes does not work in SDK 15.3</title><link>https://devzone.nordicsemi.com/thread/213367?ContentTypeID=1</link><pubDate>Fri, 04 Oct 2019 10:41:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:896e7a0c-5407-48a0-bcfe-9bbbe3a9d337</guid><dc:creator>awneil</dc:creator><description>[quote userid="18935" url="~/f/nordic-q-a/52834/example-serial_uartes-does-not-work-in-sdk-15-3/213253"]Don&amp;#39;t know anything about &amp;quot;virtual UART&amp;quot; - what is the supposed to mean[/quote]
&lt;p&gt;Maybe &lt;a href="https://devzone.nordicsemi.com/members/gmdewitt"&gt;GaryD&lt;/a&gt;&amp;#39;s referring to a bit-banged &amp;quot;software&amp;quot; UART - something like &lt;a href="https://devzone.nordicsemi.com/members/ovrebekk"&gt;ovrebekk&lt;/a&gt; described ... ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example serial_uartes does not work in SDK 15.3</title><link>https://devzone.nordicsemi.com/thread/213343?ContentTypeID=1</link><pubDate>Fri, 04 Oct 2019 09:07:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09d1f322-da23-4a60-863a-dfda20f42cfb</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Gary&lt;/p&gt;
&lt;p&gt;Some work was done a while back to implement an additional UART using the PWM and SAADC peripherals for TX and RX.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This gives you an additional UART assuming you can accept the limitations of this library, which only supports limited baudrate and no flow control or parity.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To check it out please refer to the following case, which also lists all the limitations:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/49844/how-to-simulate-uart-with-gpio"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/49844/how-to-simulate-uart-with-gpio&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For a full description of the flow control feature please refer to the Transmission and Reception chapters in the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/uarte.html?cp=3_0_0_5_33"&gt;UARTE chapter in the datasheet&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Essentially communication will only take place if both the RTS and CTS lines are asserted (low), and the RTS signal will be automatically de-asserted if you either stop the UART RX or if you only have 4 bytes left in the RX buffer (since some UART devices send a couple of bytes after the RTS line is de-asserted).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example serial_uartes does not work in SDK 15.3</title><link>https://devzone.nordicsemi.com/thread/213253?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2019 16:45:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd2b9b87-46ca-455a-9034-9d274b7f8428</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Two UART TX and two RX lines can be active at any time, as there are only two UARTE peripherials.&lt;/p&gt;
&lt;p&gt;Your setup sounds to me like you&amp;#39;ll need at least 3 independent RX lines. No dice on NRF52840.&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t know anything about &amp;quot;virtual UART&amp;quot; - what is the supposed to mean?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example serial_uartes does not work in SDK 15.3</title><link>https://devzone.nordicsemi.com/thread/213201?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2019 12:59:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06bff7a4-afd1-4725-972b-bdd77be60621</guid><dc:creator>GaryD</dc:creator><description>&lt;p&gt;Turbo,&lt;/p&gt;
&lt;p&gt;Thank you for your comment.&amp;nbsp; However, I&amp;nbsp;thought if you use the UARTEs, there can be more than 2 virtual UARTs.&lt;/p&gt;
&lt;p&gt;I did find out how to correct the fix the example serial_uartes as talked about in&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/25173/nrf52840-uart1-not-working-in-sdk-14"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/25173/nrf52840-uart1-not-working-in-sdk-14&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I replaced the following in sdk_config.h:&lt;/p&gt;
&lt;p&gt;#ifndef CLOCK_ENABLED&lt;br /&gt;#define CLOCK_ENABLED 1&lt;/p&gt;
&lt;p&gt;changed to:&lt;/p&gt;
&lt;p&gt;#ifndef NRF_CLOCK_ENABLED&lt;br /&gt;#define NRF_CLOCK_ENABLED 1&lt;/p&gt;
&lt;p&gt;Based on your comment, I still need to confirm if my understanding is correct about using the the UARTE serial interfaces available in the nrf52840.&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;GaryD&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example serial_uartes does not work in SDK 15.3</title><link>https://devzone.nordicsemi.com/thread/213138?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2019 09:06:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b529b43e-f032-4aee-9471-03972a204878</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;The NRF52840 has only two UARTs, which seems not enough to talk to 3 peripherials...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>