<?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>nrf52840 UART variable length receive</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92025/nrf52840-uart-variable-length-receive</link><description>hi 
 I have a question about uart receive. 
 The UART example receives data based on special characters or the length of the received data to determine whether it is a string.but in my code receives not special characters or unknown length. 
 In the nRF5</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 28 Sep 2022 06:38:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92025/nrf52840-uart-variable-length-receive" /><item><title>RE: nrf52840 UART variable length receive</title><link>https://devzone.nordicsemi.com/thread/388253?ContentTypeID=1</link><pubDate>Wed, 28 Sep 2022 06:38:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6034daae-273d-4a19-bd11-266119ce8b63</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="shark"]If a timeout occurs, an event is generated indicating that the data stream has been received. If rx_Buffer is full, an event is generated indicating that the data may not have been received.[/quote]
&lt;p&gt;It is a bit unclear to me what you mean here.&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="shark"]If a timeout occurs, an event is generated indicating that the data stream has been received.[/quote]
&lt;p&gt;A timeout normally means that the complete data has &lt;strong&gt;not&lt;/strong&gt; being received.&lt;/p&gt;
[quote user="shark"]When an event is generated, how do you know that data is still being received?[/quote]
&lt;p&gt;Which event exactly are we discussing about here? Is it still&amp;nbsp;&lt;span&gt;NRF_LIBARTE_ASYNC_EVT_RX_DATA&amp;nbsp;?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 UART variable length receive</title><link>https://devzone.nordicsemi.com/thread/387793?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 05:27:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb008460-b4c4-4dc0-bbb3-2bd222cb562a</guid><dc:creator>shark</dc:creator><description>&lt;p&gt;Thanks for your reply, the problem has been solved.&lt;br /&gt;But I have one more question. My program uses the NRF_LIBARTE_ASYNC_EVT_RX_DATA event to determine if the data has been received.&lt;br /&gt;When data is received, timeout and RX_buffer is full generate events. If a timeout occurs, an event is generated indicating that the data stream has been received. If rx_Buffer is full, an event is generated indicating that the data may not have been received.&lt;/p&gt;
&lt;p&gt;When an event is generated, how do you know that data is still being received?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 UART variable length receive</title><link>https://devzone.nordicsemi.com/thread/387257?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2022 10:31:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2aa95aee-17e1-4fb6-9021-314586efa509</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;you need to remote app_timer2.c from your project and only include app_timer_freertos.c.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 UART variable length receive</title><link>https://devzone.nordicsemi.com/thread/387239?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2022 09:25:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4aaf9a4e-9458-41dd-8293-d8ed5bdd8e4b</guid><dc:creator>shark</dc:creator><description>&lt;p&gt;I have used nRF5_SDK_17.1.0_ddde560version SDK,libuarte&amp;nbsp;is base-metal program,porting a a part of UART function to blinky_freertos&amp;nbsp;to compiled failed.as follows:&lt;/p&gt;
&lt;p&gt;.\_build\nrf52840_xxaa.axf: Error: L6200E: Symbol RTC1_IRQHandler multiply defined (by drv_rtc.o and port_cmsis_systick.o).&lt;/p&gt;
&lt;p&gt;.\_build\nrf52840_xxaa.axf: Error: L6200E: Symbol app_timer_create multiply defined (by app_timer2.o and app_timer_freertos.o).&lt;/p&gt;
&lt;p&gt;.\_build\nrf52840_xxaa.axf: Error: L6200E: Symbol app_timer_init multiply defined (by app_timer2.o and app_timer_freertos.o).&lt;/p&gt;
&lt;p&gt;.\_build\nrf52840_xxaa.axf: Error: L6200E: Symbol app_timer_start multiply defined (by app_timer2.o and app_timer_freertos.o).&lt;/p&gt;
&lt;p&gt;.\_build\nrf52840_xxaa.axf: Error: L6200E: Symbol app_timer_stop multiply defined (by app_timer2.o and app_timer_freertos.o).&lt;/p&gt;
&lt;p&gt;How do I solve it?&lt;/p&gt;
&lt;p&gt;In the meantime,I`m looking at other solutions you recommended.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 UART variable length receive</title><link>https://devzone.nordicsemi.com/thread/387080?ContentTypeID=1</link><pubDate>Tue, 20 Sep 2022 12:56:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:694418ef-75af-416c-bdb1-30c501cd2e46</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;It is not possible for us to provide examples will all possible combinations of features (baremetal or OS). All the examples given are to be used as a template and then you add features there after. This is better than starting from scratch for most of the cases.&lt;/p&gt;
[quote user="shark"]&lt;span&gt;I guess it is a timer conflict.&lt;/span&gt;I am very frustrated, do not know how to solve.I wonder if you can&amp;nbsp;help me,write an example project based on FreeRTOS.[/quote]
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/68615/running-libuarte-on-both-uarts-with-freertos"&gt;Libuarte and FreeRTOS combo is not supported&lt;/a&gt; out of the box. So you need to do this yourself. Ofcourse we can help you solve technical issues, but you need to be more specific on the problem you have.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What is the setup you are using (Device and SDK version)? &lt;br /&gt;What are the changes you made? &lt;br /&gt;what errors are you getting?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you give us some code snippets on the changes you made in your porting efforts so that we can try to see if we can review/help ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 UART variable length receive</title><link>https://devzone.nordicsemi.com/thread/386972?ContentTypeID=1</link><pubDate>Tue, 20 Sep 2022 00:39:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f505b5f8-bd20-4e44-a054-35404f5e7a4a</guid><dc:creator>shark</dc:creator><description>&lt;p&gt;Hi，&lt;/p&gt;
&lt;p&gt;I have tried porting&amp;nbsp;&lt;span&gt;example of&amp;nbsp;\examples\peripheral\libuarte into&amp;nbsp;FreeRTOS,but the compiled failed after the porting was complete.example of libuarte is bare-metal program,&lt;/span&gt;&amp;nbsp;porting Directly&amp;nbsp;&lt;span&gt;to FreeRTOS to compiled failed, I guess it is a timer conflict.&lt;/span&gt;I am very frustrated, do not know how to solve.I wonder if you can&amp;nbsp;help me,write an example project based on FreeRTOS.I`m looking forward to your reply.&lt;/p&gt;
&lt;p&gt;sincerely yours.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 UART variable length receive</title><link>https://devzone.nordicsemi.com/thread/386807?ContentTypeID=1</link><pubDate>Mon, 19 Sep 2022 10:25:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62d3aa9d-e5bd-4468-9a5a-e6f3e50886c9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user=""]How do I implement&amp;nbsp;receiving UART data of&amp;nbsp;&lt;span&gt;variable length&lt;/span&gt; like example of&amp;nbsp;\examples\peripheral\libuarte?[/quote]
&lt;p&gt;You should be able to port this example to FreeRTOS but I do not have any templates to show you at this moment. It looks like a very simple example that can be easily ported to FreeRTOS where the callbacks are happening in interrupt context. All you need to do is to create another FreeRTOS task to be able to do a NRF_LOG_FLUSH in a loop in the new task.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>