<?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>Trouble receiving UART buffer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13091/trouble-receiving-uart-buffer</link><description>Hi, 
 Im trying to use the NRF51DK evaluation board as a data channel between another MCU
and the PCA_10031 bluetooth dongle. Im not using softdevice. 
 My implementation is based on the radio receiver and transmitter example in the SDK with
minor</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 18 Apr 2016 12:36:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13091/trouble-receiving-uart-buffer" /><item><title>RE: Trouble receiving UART buffer</title><link>https://devzone.nordicsemi.com/thread/49919?ContentTypeID=1</link><pubDate>Mon, 18 Apr 2016 12:36:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a431d97f-4569-4669-a5ab-f959c71c5bd9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi assafi,
Good to know it&amp;#39;s fixed. But I don&amp;#39;t fully understand what did you do with &amp;quot; I&amp;#39;ve changed this function to uart_event_handler() in app_uart_fifo.c&amp;quot;.
Note that uart_event_handler() in app_uart_fifo.c should be used when calling nrf_drv_uart_init().&lt;/p&gt;
&lt;p&gt;The uart_event_handler() should be used when calling app_uart_init() they are not the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble receiving UART buffer</title><link>https://devzone.nordicsemi.com/thread/49918?ContentTypeID=1</link><pubDate>Fri, 15 Apr 2016 15:48:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4591c8ee-786d-4718-9c1c-764615d96774</guid><dc:creator>assafi</dc:creator><description>&lt;p&gt;Hi, Problem solved!&lt;/p&gt;
&lt;p&gt;The problem was that my uart_event_handler function was empty.
I&amp;#39;ve changed this function to uart_event_handler() in app_uart_fifo.c and increased the buffer size.&lt;/p&gt;
&lt;p&gt;In the previous method, the incoming bytes overflowed the hardware fifo (which is only 4-byte). Now, using this method, every time a byte received it is stored in the software fifo which app_uart_get() read from.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble receiving UART buffer</title><link>https://devzone.nordicsemi.com/thread/49917?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 09:16:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dffe87d0-6d55-4757-ab93-cdb4c075e5b3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Assafi,&lt;/p&gt;
&lt;p&gt;Could you confirm you see the same issue when testing with the UART example in our SDK ? It&amp;#39;s located at \examples\peripheral\uart.
Could you test the PCA10031 UART communication with PC also ?
Have you tried to monitor the UART pins  ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble receiving UART buffer</title><link>https://devzone.nordicsemi.com/thread/49916?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2016 15:13:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31d5fd4f-a486-4e37-b97d-92cfce5e9e4b</guid><dc:creator>assafi</dc:creator><description>&lt;p&gt;Thanks again for your reply.
I&amp;#39;m afraid the transmitter and receiver are not relevant to my problem. Let me describe it diffrently:
Another MCU is connected to the NRF via UART. The MCU is sending 1-byte each time, with small delay between each transmission.
The NRF suppose the cache these bytes and send them to the computer via UART.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;while(true)
{
while(app_uart_get(&amp;amp;data) != NRF_SUCCESS){}
app_uart_put(data);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The problem is that i can see only the first 3-4 bytes in each transmission cycle (out of 15).
When i connect the MCU UART to the computer with FTDI cable, I can see all the data.&lt;/p&gt;
&lt;p&gt;Im not using Hardware flow control.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble receiving UART buffer</title><link>https://devzone.nordicsemi.com/thread/49915?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2016 07:30:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c273f0f-1830-4814-ba31-b029c4900a1c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Could you explain a little bit more on &amp;quot;The transmitter and receiver have been tested to the rate im expecting from the UART without any problems&amp;quot; ?
If you only test UART communication between your MCU and the nRF51, what is the result ?&lt;/p&gt;
&lt;p&gt;Did you use Hardware flow control ? Have you tried to monitor the UART pins using a logic analyzer ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble receiving UART buffer</title><link>https://devzone.nordicsemi.com/thread/49920?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2016 15:00:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd76643d-e48d-42d8-a4db-c33408619e17</guid><dc:creator>assafi</dc:creator><description>&lt;p&gt;thanks for your answer.
I used app_uart_fifo. The UART_RX_BUF_SIZE is set to 256.
The transmitter and reciver have been tested to the rate im expecting from the UART without any problems.
Im sure that the bottleneck is the UART.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble receiving UART buffer</title><link>https://devzone.nordicsemi.com/thread/49914?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2016 13:48:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da3bf5a3-e7d2-4076-948f-593ee829ed99</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@assafi: Which app_uart did you use, app_uart or app_uart_fifo? Have you made sure you set the UART_RX_BUF_SIZE (when calling APP_UART_FIFO_INIT) big enough ?&lt;/p&gt;
&lt;p&gt;You should test just receiving UART first, comment out the part to send data via BLE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>