<?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>How to emulate synchronize UART communication with libuarte?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61253/how-to-emulate-synchronize-uart-communication-with-libuarte</link><description>I&amp;#39;m working on a simple project based on the USB CDC ACM and libuarte example, the chip is nrf52840. 
 A function is redirect the USB VCP data to another MCU via UART, just like what FTDI&amp;#39;s FT232RL do. 
 When a large packet (6k bytes+) comes from USB</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 May 2020 13:54:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61253/how-to-emulate-synchronize-uart-communication-with-libuarte" /><item><title>RE: How to emulate synchronize UART communication with libuarte?</title><link>https://devzone.nordicsemi.com/thread/249509?ContentTypeID=1</link><pubDate>Tue, 12 May 2020 13:54:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6334f949-3378-4eeb-8fa4-1fbb09da74bf</guid><dc:creator>esonhon</dc:creator><description>&lt;p&gt;Thanks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Actually, I blocked the&amp;nbsp;APP_USBD_CDC_ACM_USER_EVT_RX_DONE event handler by hard delay, it works but looks not so good. Want to find a way to wait UARTE dealing with all bytes smoothly, such as SYNC uart transfer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to emulate synchronize UART communication with libuarte?</title><link>https://devzone.nordicsemi.com/thread/249508?ContentTypeID=1</link><pubDate>Tue, 12 May 2020 13:47:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:feb4ada8-1ac1-4c0b-a25c-23cf82e726c7</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I think you should look into change the implementation such that you don&amp;#39;t call&amp;nbsp;app_usbd_cdc_acm_read() unless you know that the&amp;nbsp;queue can handle the size (e.g. use nrf_queue_available_get()) of the data received by&amp;nbsp;&lt;span&gt;app_usbd_cdc_acm_read(). I believe not calling&amp;nbsp;app_usbd_cdc_acm_read() will stall the communication on USB, which should not be a problem, it should just cause a delay until queue is ready to receive more data. So the do{}while() should not run more times than&amp;nbsp;&lt;/span&gt;nrf_queue_available_get() says it can handle.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>