<?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>Real UART TX transmit depth?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23687/real-uart-tx-transmit-depth</link><description>I was wondering if anyone has done any extremely high speed UART work on the nRF51 (or the non-EasyDMA module on the nRF52). I need to improve performance for an existing prototype that has to stream a large amount of data over UART (and frame it, and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 23 Jul 2017 22:45:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23687/real-uart-tx-transmit-depth" /><item><title>RE: Real UART TX transmit depth?</title><link>https://devzone.nordicsemi.com/thread/93111?ContentTypeID=1</link><pubDate>Sun, 23 Jul 2017 22:45:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:900cef83-44f6-488c-873b-010835063188</guid><dc:creator>samsonc</dc:creator><description>&lt;p&gt;The framing/deframing code is not running in the ISR. There is just a standard circular buffer from the ISR to the framing/deframing code. In fact, I&amp;#39;m thinking about moving the framing code into the ISR, as it should reduce overall time spent from passing the bytes back and forth, and the deframing code is quite fast (a few us / byte, still working on it). I am not as concerned with latencies up to ~50us for the rest of my code - I&amp;#39;m really only concerned with the outright number of CPU cycles taken by the communications code, as some of the other modules are CPU heavy.&lt;/p&gt;
&lt;p&gt;Again, I agree and wish it were so easy to switch to the nRF52 for this project - I&amp;#39;m using it for a parallel project, and I really love all of the improvements - but for the reasons above (lots of cycle sensitive code in other SW modules to retest and rewrite + existing HW) I don&amp;#39;t think it&amp;#39;s really an option.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Real UART TX transmit depth?</title><link>https://devzone.nordicsemi.com/thread/93110?ContentTypeID=1</link><pubDate>Sun, 23 Jul 2017 12:07:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3acd41cd-07df-43bd-bb6e-512246f4fdab</guid><dc:creator>Turbo J</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;UART TX buffer depth is actually more than documented - you can actually stuff 3 bytes in, and those same 3 bytes will come out.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Show us your test code, you more likely made a mistake somewhere when you tested that behaviour.&lt;/p&gt;
&lt;p&gt;The only way to improve performance on the NRF51x is to make the ISRs even shorter, IMHO that means moving the framing/deframing code out of the handler fuction and into main() loop.&lt;/p&gt;
&lt;p&gt;As there are about 160 clock cycles per byte at 1Mbaud and an ISR would take at least 24 for housekeeping alone, there will be a significant slowdown in main() processing at the time of data transfer.&lt;/p&gt;
&lt;p&gt;If you CPU speed is too slow you will need to upgrade to NRF52x - the redesign might actually be cheaper than spending many hours trying to improve the software.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>