<?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>Gazell data lag when more than 1 device is connected</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22088/gazell-data-lag-when-more-than-1-device-is-connected</link><description>Hi!
I am fairly new to programming micro controllers so apologies if I ask many questions.
I am using NRF52832. The situation is this - I have 2 devices and 1 host . After receiving data the host then sends data via UART to FT232RL and then to a computer</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Jun 2017 12:56:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22088/gazell-data-lag-when-more-than-1-device-is-connected" /><item><title>RE: Gazell data lag when more than 1 device is connected</title><link>https://devzone.nordicsemi.com/thread/86794?ContentTypeID=1</link><pubDate>Thu, 08 Jun 2017 12:56:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:957f6102-4ad6-4849-9ab5-9ff89ba7eeea</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Viktor&lt;/p&gt;
&lt;p&gt;Are you still experiencing issues with packets arriving in bursts?&lt;br /&gt;
One thing you can try is to set a shorter timeslot on the device side than on the host side (try values 20-50us shorter). Then there is less chance that the device will drop completely out of sync, and have to retransmit the data several times to get back in sync (if the device is faster than the host you typically get away with a single retransmit to get back in sync).&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Gazell data lag when more than 1 device is connected</title><link>https://devzone.nordicsemi.com/thread/86792?ContentTypeID=1</link><pubDate>Wed, 31 May 2017 12:58:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b663dabd-2bd7-45a4-8391-64bcc79f311f</guid><dc:creator>LT_Viktor</dc:creator><description>&lt;p&gt;Hi again.
It seems that my byte skipping problem was not solved after all... But I have solved it now - removing the UART sending loop from the host&amp;#39;s nrf_gzll_host_rx_data_ready(..) interrupt and increasing the buffer size for UART_TX  solved the issue. However, now my data seems to come in little bursts of packets (no packets are lost) and it looks like the stream of data lags instead of being a smooth and constant. Thanks a lot for your help by the way.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Gazell data lag when more than 1 device is connected</title><link>https://devzone.nordicsemi.com/thread/86791?ContentTypeID=1</link><pubDate>Fri, 26 May 2017 12:10:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b4897e5-3270-4730-903b-bd6ed9866439</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Have you done some debugging to check how often the nrf_gzll_device_tx_failed(..) callback occurs?&lt;/p&gt;
&lt;p&gt;As it is I don&amp;#39;t think you are handling this interrupt correctly. You handle it by re sending the data_payload buffer, but at this point that buffer might already have been overwritten by new sensor data.&lt;/p&gt;
&lt;p&gt;Secondly, you might want to check the return code from the nrf_gzll_add_packet_to_tx_fifo(..) calls, in case the internal buffers fill up. Once that happens the data will not be uploaded, and if you don&amp;#39;t store it externally the packet will be lost.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Gazell data lag when more than 1 device is connected</title><link>https://devzone.nordicsemi.com/thread/86793?ContentTypeID=1</link><pubDate>Mon, 22 May 2017 14:52:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8621d442-46be-4603-a471-06abff93b53e</guid><dc:creator>LT_Viktor</dc:creator><description>&lt;p&gt;OK. I attached code to the question. It has changed since the initial question a bit. I found that the best results were achieved when the host was listening on a channel for a longer period of time ( timeslot=4800, timeslots per channel=1) (but not longer that the sample frequency - 10ms) and the device would have multiple attempts to send the data ( timeslot=600, timeslots per channel=8). The stream then is somewhat stable, however I have a suspicion that I am not getting all of the packets...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Gazell data lag when more than 1 device is connected</title><link>https://devzone.nordicsemi.com/thread/86790?ContentTypeID=1</link><pubDate>Mon, 22 May 2017 13:38:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aae4012d-0662-49ef-aba9-e3bd99ad7ef4</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Viktor&lt;/p&gt;
&lt;p&gt;You can&amp;#39;t attach files in comments, but if you edit your original question there should be an &amp;quot;Attachment&amp;quot; button that allows you to attach larger files (or you can click Ctrl + F).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Gazell data lag when more than 1 device is connected</title><link>https://devzone.nordicsemi.com/thread/86789?ContentTypeID=1</link><pubDate>Mon, 22 May 2017 10:09:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df5783a6-35a7-4bc7-b2b5-e02d8a92c4d8</guid><dc:creator>LT_Viktor</dc:creator><description>&lt;p&gt;My UART baudate is 921600. From each device I am trying to send 19.2 kbps (24 bytes, at 100 Hz). Indeed it is not a standard development kit - it is something I got together myself. The host has only the NRF52832 and the FT232RL and the devices have IMU devices (LSM330DLC). I think I am having trouble with syncing the devices, as by changing the sync time the flow of data from the devices changes. So far the best result was when the devices and the host had the same time slot time (1200) and 2mbps data rate.
How can I attach a file to a comment ? The code is pretty long and won&amp;#39;t fit in the comment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Gazell data lag when more than 1 device is connected</title><link>https://devzone.nordicsemi.com/thread/86788?ContentTypeID=1</link><pubDate>Thu, 18 May 2017 14:45:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38801a2b-536d-49b5-a606-3f831e3665b2</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Viktor&lt;/p&gt;
&lt;p&gt;What is your UART baudrate, and how much data are you trying to send from each device?&lt;/p&gt;
&lt;p&gt;What kind of hardware are you using for the nRF52? Since you mention the FT232RL chip I assume it is not a standard development kit?&lt;/p&gt;
&lt;p&gt;Maybe you can share your nRF52 code project, so I can have a look at it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Gazell data lag when more than 1 device is connected</title><link>https://devzone.nordicsemi.com/thread/86787?ContentTypeID=1</link><pubDate>Tue, 16 May 2017 14:46:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:914bc40f-5fc3-4d14-80a1-9f3d0d111c19</guid><dc:creator>LT_Viktor</dc:creator><description>&lt;p&gt;Ok. I have managed to fix the byte skipping by using &lt;a href="https://devzone.nordicsemi.com/question/21058/advice-for-optimizing-multiple-device-gazell-system/"&gt;this answer&lt;/a&gt;. However, now I have data coming in  little bursts  at first and then it slows down gradually to a very slow rate... When I reset the host same thing happens again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>