<?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 use uarte in 1M baud. RXD.AMOUNT will not update until fill up rxbuffer?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54792/how-to-use-uarte-in-1m-baud-rxd-amount-will-not-update-until-fill-up-rxbuffer</link><description>SDK:V15 
 chip:52832 
 development kit:window+keil 
 
 In stm32,inder to use uart rx with DMA, we could easily use:uart Idle interrupt+dma.but how in 52832 while how many byte of a frame to recevie is uncertainty? 
 in order to test,i designed a master</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Jan 2020 15:03:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54792/how-to-use-uarte-in-1m-baud-rxd-amount-will-not-update-until-fill-up-rxbuffer" /><item><title>RE: how to use uarte in 1M baud. RXD.AMOUNT will not update until fill up rxbuffer?</title><link>https://devzone.nordicsemi.com/thread/229099?ContentTypeID=1</link><pubDate>Tue, 14 Jan 2020 15:03:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75d33e49-5b62-4cab-b73f-bb5ad3e74e71</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;You should post unrelated questions like this in a new case, rather than adding it to an old one.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then you get a quicker response, and avoid adding clutter to the existing case.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The device family packs we publish are added here:&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/"&gt;https://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I see that 8.27.0 is not available, but you should be able to use 8.27.1 instead.&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: how to use uarte in 1M baud. RXD.AMOUNT will not update until fill up rxbuffer?</title><link>https://devzone.nordicsemi.com/thread/228030?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2020 06:54:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30990760-730b-4b73-835c-78a8b871e706</guid><dc:creator>TODOALL</dc:creator><description>&lt;p&gt;Hello, I used SDK 16.0.0, but compiled in keil and found that nRF_DeviceFamilyPack_NordicLicense.8.27.0 is missing, but the official website did not find the download link for this&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use uarte in 1M baud. RXD.AMOUNT will not update until fill up rxbuffer?</title><link>https://devzone.nordicsemi.com/thread/223947?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2019 14:13:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb4af04d-86bf-4b6b-a8de-259a86e355e0</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I will let Jørgen handle your case, but with the double buffer implementation used in the nrf_libuarte driver this should not be an issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All you have to do is make sure the buffer size is scaled according to how long the UART interrupts could be delayed by higher priority interrupts.&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: how to use uarte in 1M baud. RXD.AMOUNT will not update until fill up rxbuffer?</title><link>https://devzone.nordicsemi.com/thread/223419?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 17:19:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:624f5f49-490c-40d3-8322-e3f52cf4fb2b</guid><dc:creator>thefool</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;I just found this thread after posting this question:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/55117/safe-uart-line-idle-detection-with-dma"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/55117/safe-uart-line-idle-detection-with-dma&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;about 2 years ago, in the solution proposed at that time, there was a chance of losing some bytes.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Is the solution, as implemented in the new driver 100% safe to use?&lt;br /&gt;&lt;br /&gt;Lets say the DMA size is 32 bytes, and the timeout is 5ms&lt;br /&gt;We then receive packet A with&amp;nbsp;25 bytes, then there is a pause of just over 5ms and another packet (B) with&amp;nbsp;25 bytes comes in.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The timer should fire after 5ms, and we get to handle the data. but immediately following the timer, the next set of data comes in.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is there a chance we lose any of that data?&lt;/p&gt;
&lt;p&gt;(in the solution proposed last time we asked, the timer would send the STOPRX event, which would then cause a timeout, the length of 4 bytes to start, then fire the RXTO event, in which one should call FLUSHRX, which would cause the EasyDMA to copy the data and send the ENDRX event (which might restart STARTRX, depending on your configuration). in that timeout of 4 bytes, any new incoming data might overwrite the old data before FLUSHRX could copy it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is that problem solved?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you ahve a diagram similar to this one for the the inactivity handling?&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uarte.html#concept_uzb_p2m_wr__fig.stoprx" rel="nofollow noopener noreferrer" target="_blank"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uarte.html#concept_uzb_p2m_wr__fig.stoprx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use uarte in 1M baud. RXD.AMOUNT will not update until fill up rxbuffer?</title><link>https://devzone.nordicsemi.com/thread/222625?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 13:14:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65bdcbc6-3b13-4300-becd-cb8c8d577924</guid><dc:creator>Taoo</dc:creator><description>&lt;p&gt;Oh！T&lt;span&gt;hank you very much!Help me a lot!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use uarte in 1M baud. RXD.AMOUNT will not update until fill up rxbuffer?</title><link>https://devzone.nordicsemi.com/thread/222296?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 10:32:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df7fd78d-f53f-4389-a007-89bb7518ea9b</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you need to stay on SDK v15.0.0 it should still be possible to copy the lib_uarte driver from SDK v16.0.0, so that you can take advantage of the latest version of this driver.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, I would strongly recommend migrating to SDK v15.3.0 even if you find it too much work to go all the way to SDK v16.0.0.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;SDK v15.3.0 should be compatible with SDK v15.0.0, but contains a number of improvements and additions compared to v15.0.0.&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: how to use uarte in 1M baud. RXD.AMOUNT will not update until fill up rxbuffer?</title><link>https://devzone.nordicsemi.com/thread/222030?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 09:41:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a99f646-1a16-47a4-9db6-f77b5ccb5bf7</guid><dc:creator>Taoo</dc:creator><description>&lt;p&gt;but could i easly to achieve in&amp;nbsp;&lt;span&gt;SDK v15.0.0?because many user&amp;nbsp;codes had exist in my project.It maybe cost more time for me to&amp;nbsp;migrate to SDK v16.0.0?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use uarte in 1M baud. RXD.AMOUNT will not update until fill up rxbuffer?</title><link>https://devzone.nordicsemi.com/thread/222026?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 09:35:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c125e44-51fd-4b95-8ddf-ea46c831287c</guid><dc:creator>Taoo</dc:creator><description>&lt;p&gt;Oh!I&amp;nbsp;seen in&amp;nbsp;&lt;span&gt;SDK v16.0.0,thank you very much!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use uarte in 1M baud. RXD.AMOUNT will not update until fill up rxbuffer?</title><link>https://devzone.nordicsemi.com/thread/222001?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 07:59:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:936a7c22-246c-4a2b-a962-1c3231927424</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;This problem is solved by the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_libuarte.html?cp=6_1_3_27_1#lib_libuarte_async"&gt;nrf_libuarte_async&lt;/a&gt;&amp;nbsp;driver. It uses a timer to detect inactivity on the UART, and generates an interrupt even if the UART buffers are not full.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then you can define a timeout period, and if no more data is received during this time you will still get an event from the driver with the currently received data.&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: how to use uarte in 1M baud. RXD.AMOUNT will not update until fill up rxbuffer?</title><link>https://devzone.nordicsemi.com/thread/221868?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 13:47:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8c8a735-4bbf-4a8b-8616-f7c554adef39</guid><dc:creator>Taoo</dc:creator><description>&lt;div class="trans-left"&gt;
&lt;div class="trans-input-wrap"&gt;
&lt;div class="input-wrap" dir="ltr"&gt;
&lt;div class="textarea-wrap without-textarea-bg"&gt;&lt;/div&gt;
&lt;div class="input-operate"&gt;&lt;a class="operate-btn op-sound data-hover-tip" href="https://fanyi.baidu.com/?aldtype=16047###"&gt;&lt;span class="icon-sound"&gt;&lt;/span&gt;&lt;/a&gt;
&lt;div class="op-favor-container"&gt;&lt;span class="icon-favo"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="trans-right"&gt;
&lt;div class="output-wrap small-font"&gt;
&lt;div class="output-mod ordinary-wrap"&gt;
&lt;div class="output-bd" dir="ltr"&gt;
&lt;p class="ordinary-output target-output clearfix"&gt;&lt;span class=""&gt;Thank you very much for your answer, but I don&amp;#39;t think it can solve my doubts very well.&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;My problem is&amp;mdash;&amp;mdash;only until dma buffer &lt;strong&gt;fill up&lt;/strong&gt;, can i get event and read data from buffer?what the suitable size of&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uarte.html#register.RXD.MAXCNT"&gt;RXD.MAXCNT&lt;/a&gt;&lt;span&gt;&amp;nbsp;should be setted?if setting 5 bytes,a frame with 6 bytes will not&amp;nbsp;completely&amp;nbsp;received?because when received 5 bytes,buffer fill up,switch to another buffered for received.but there remain 1byte,so the dma buffered will not fill up.Upper layer could not get a complete frame.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use uarte in 1M baud. RXD.AMOUNT will not update until fill up rxbuffer?</title><link>https://devzone.nordicsemi.com/thread/221848?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 12:56:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c095d9f-73ca-49d1-b46c-4a7b5c2d4c64</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would strongly suggest using the nrf_libuarte driver available in the SDK. It is designed to allow efficient use of the DMA buffers with the UART, and is double buffered to ensure that you don&amp;#39;t drop any data when the buffers fill up.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can read more about this driver &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_libuarte.html?cp=6_1_3_27"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would also recommend migrating to SDK v16.0.0 if you can, to get the latest version of the driver.&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></channel></rss>