<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/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/"><channel><title>UART BUFFER</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/27284/uart-buffer</link><description> 
i have seen some UART code implemented using BUFFER..... 
I have donE simple uart program using interrupt with
lpc2148........ 
what is the advantage of using BUFFER 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: UART BUFFER</title><link>https://community.arm.com/thread/126179?ContentTypeID=1</link><pubDate>Thu, 20 May 2010 06:13:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e23bdf4d-153f-44e0-9116-b56ce10fbeb5</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
But it&amp;#39;s probably best not to use that term in your
&lt;b&gt;Googling:&lt;/b&gt; you will get plenty of hits with &amp;quot;ring buffer&amp;quot; and
&amp;quot;circular buffer&amp;quot; - but &amp;quot;round-robin&amp;quot; will confuse the issue with
lots of references to task schedulers...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART BUFFER</title><link>https://community.arm.com/thread/115764?ContentTypeID=1</link><pubDate>Thu, 20 May 2010 05:53:33 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c457748a-0b25-4084-86e6-5a05ae15fcd3</guid><dc:creator>edPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Sometimes, the name round-robin is also used for the ring
buffers.&lt;/p&gt;

&lt;p&gt;
And the magic with a ring buffer is that data is never moved.
Instead, the insert and remove positions are stepped in a circular
way. Not needing to move the data when an entry is consumed means
that both insert and remove operations are constant-time and not
affected by the size of the buffer or the amount of data currently
stored in the buffer.&lt;/p&gt;

&lt;p&gt;
Another advantage - having a separate insert and remove pointer
means that one task (the inserting one) is owning and updating the
insert position. Another task (the consumer) is updating the read
position. This means that a ring buffer in many situations can insert
and remove data without any locking primitives (in some part
depending on atomicity for the given hw platform).&lt;/p&gt;

&lt;p&gt;
But all this - and more - can be found with a bit of Google
usage.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART BUFFER</title><link>https://community.arm.com/thread/103973?ContentTypeID=1</link><pubDate>Thu, 20 May 2010 05:28:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:217cf799-86ec-4bc4-9654-ee2b14eed9a0</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;It is very common to use a so-called &amp;quot;Ring&amp;quot; or &amp;quot;Circular&amp;quot;
buffer with a UART - there are examples here on the Keil site, and
&lt;b&gt;Google will tell you lots about them...&lt;/b&gt;&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART BUFFER</title><link>https://community.arm.com/thread/115775?ContentTypeID=1</link><pubDate>Thu, 20 May 2010 05:05:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:757477bf-ef06-45cb-9eab-919e8605d685</guid><dc:creator>help at89c52</dc:creator><description>&lt;p&gt;&lt;p&gt;
Question four answered - Tick.&lt;/p&gt;

&lt;p&gt;
On the way to 100%&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART BUFFER</title><link>https://community.arm.com/thread/103976?ContentTypeID=1</link><pubDate>Thu, 20 May 2010 04:55:27 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:82ae0704-9752-41e6-9f54-ed00d591a0e5</guid><dc:creator>edPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Advantage with a buffer?&lt;/p&gt;

&lt;p&gt;
That you don&amp;#39;t need to react at the exact moment when a character
is received. You may let your main loop do what it needs to do, and
now and then check the buffer for received data.&lt;/p&gt;

&lt;p&gt;
Think about it. What is the difference between having to be home
when the mailman comes, or having a post box and just have to check
the box for received mail?&lt;/p&gt;

&lt;p&gt;
Without ringbuffer, and without a FIFO in the UART, you will lose
characters if you don&amp;#39;t pick up the last received character before
the next character has been shifted into the UART.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART BUFFER</title><link>https://community.arm.com/thread/78338?ContentTypeID=1</link><pubDate>Thu, 20 May 2010 04:41:45 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c8fbc22a-c75b-4848-bdef-5c4449f8a9f3</guid><dc:creator>sujith KM</dc:creator><description>&lt;p&gt;&lt;p&gt;
i forgot to mention the buffer type........&lt;br /&gt;
it is software &lt;b&gt;ring buffer&lt;/b&gt; .......&lt;br /&gt;
here in this example application they are using software interrupt
also &lt;b&gt;swi 8 &amp;amp; 9&lt;/b&gt; ......&lt;br /&gt;
what is advantage by storing the data in a ring buffer.....&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART BUFFER</title><link>https://community.arm.com/thread/78340?ContentTypeID=1</link><pubDate>Thu, 20 May 2010 04:14:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7236f56b-d1b5-47a1-9327-8f0230017241</guid><dc:creator>sujith KMT</dc:creator><description>&lt;p&gt;&lt;p&gt;
good Answer andy neil.....&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART BUFFER</title><link>https://community.arm.com/thread/65630?ContentTypeID=1</link><pubDate>Thu, 20 May 2010 04:10:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:03f7eff9-8270-4713-bd68-ed14b59a32ab</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
What &amp;quot;buffer&amp;quot; are you referring to?&lt;/p&gt;

&lt;p&gt;
Some UARTs have a built-in buffer - commonly called a &amp;quot;FIFO&amp;quot; -
which, as Tamir says, can have the advantage of reducing the number
of interrupts.&lt;/p&gt;

&lt;p&gt;
Your own software can also make use of a &amp;quot;buffer&amp;quot; - meaning some
temporary storage where received characers can be held until the
application is ready to process them.&lt;/p&gt;

&lt;p&gt;
It is very common to use a so-called &lt;b&gt;&amp;quot;Ring&amp;quot;&lt;/b&gt; or
&lt;b&gt;&amp;quot;Circular&amp;quot;&lt;/b&gt; buffer with a UART - there are examples here on the
Keil site, and Google will tell you lots about them...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART BUFFER</title><link>https://community.arm.com/thread/58202?ContentTypeID=1</link><pubDate>Thu, 20 May 2010 03:50:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:762356a9-e60d-4928-b922-d0fec203d840</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
Shortly - less interrupts. You can setup the UART to generate an
interrupt only if a number of characters (8, 14 etc.) have been
received - not for every character.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>