<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: weird lag spots</title>
		<link>http://forums.leaflabs.com/topic.php?id=1285</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:15:55 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=1285" rel="self" type="application/rss+xml" />

		<item>
			<title>cyberia on "weird lag spots"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1285#post-7797</link>
			<pubDate>Thu, 19 Jan 2012 16:33:17 +0000</pubDate>
			<dc:creator>cyberia</dc:creator>
			<guid isPermaLink="false">7797@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;yeah i figured it was me, i don't think anything would give it that much delay&#60;/p&#62;
&#60;p&#62;i'll have another go at trying to work out where the problem is&#60;/p&#62;
&#60;p&#62;ta for the help
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "weird lag spots"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1285#post-7781</link>
			<pubDate>Wed, 18 Jan 2012 21:47:52 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">7781@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;In your data:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;1332 -4 58
1363 57 57
13951523 55 22
1554 52 -8
1586 54 -10&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Have you diagnosed the cause of the millis value '13951523'?&#60;br /&#62;
There may be something else going on which is not a delay.&#60;br /&#62;
It looks like characters were lost or a buffer overwritten before being sent.&#60;br /&#62;
That could be a real bug, and not something caused by a delay.&#60;/p&#62;
&#60;p&#62;Can you force each line to be sent? Or even send it twice?&#60;br /&#62;
Can you add an extra value? Put a 'packet sequence number' or 'packet count' at the front so that you can see how many packets the Maple thinks it has sent.&#60;/p&#62;
&#60;p&#62;When you said delay, I thought you meant a fraction of a millisecond. &#60;/p&#62;
&#60;p&#62;Losing 100ms is way beyond anything that I'd expect to cause a delay other than your code or blocking IO.&#60;/p&#62;
&#60;p&#62;If you switch Systick off, you'll lose the millisecond timer, and the interrupt routine is only a microsecond.&#60;/p&#62;
&#60;p&#62;I'd put the vehicle 'on bricks' or whatever needs to be done so that you can test subsets of its functionality. I'd start by skipping all IO except the xbee; just count up to show that it is alive.&#60;/p&#62;
&#60;p&#62;Other than the motor control, have you any other IO? If not, it is likely that or the xbee.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cyberia on "weird lag spots"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1285#post-7779</link>
			<pubDate>Wed, 18 Jan 2012 19:56:24 +0000</pubDate>
			<dc:creator>cyberia</dc:creator>
			<guid isPermaLink="false">7779@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;as in&#60;/p&#62;
&#60;p&#62;for(...){&#60;br /&#62;
   do the things, then&#60;br /&#62;
   delay(x)&#60;br /&#62;
}
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bubulindo on "weird lag spots"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1285#post-7777</link>
			<pubDate>Wed, 18 Jan 2012 18:28:47 +0000</pubDate>
			<dc:creator>bubulindo</dc:creator>
			<guid isPermaLink="false">7777@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;delay loop?? &#60;/p&#62;
&#60;p&#62;as in delay() ??
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cyberia on "weird lag spots"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1285#post-7775</link>
			<pubDate>Wed, 18 Jan 2012 16:05:02 +0000</pubDate>
			<dc:creator>cyberia</dc:creator>
			<guid isPermaLink="false">7775@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;is it possibly related to the PWM outputs? I'm using a sparkfun equivalent pwm motor control board running to the wheels&#60;/p&#62;
&#60;p&#62;would changing the pwm duty take that long and/or cause that type of thing? i assumed it would be pretty simple and not take long to adjust
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cyberia on "weird lag spots"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1285#post-7774</link>
			<pubDate>Wed, 18 Jan 2012 15:12:48 +0000</pubDate>
			<dc:creator>cyberia</dc:creator>
			<guid isPermaLink="false">7774@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;the comms is triggered in this case using a delay loop to report every however long.&#60;/p&#62;
&#60;p&#62;mostly this works pretty well but every now and then it does that ^^
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cyberia on "weird lag spots"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1285#post-7773</link>
			<pubDate>Wed, 18 Jan 2012 15:11:23 +0000</pubDate>
			<dc:creator>cyberia</dc:creator>
			<guid isPermaLink="false">7773@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;what it is sending is odometry back from a remote controlled vehicle, i.e.&#60;/p&#62;
&#60;p&#62;[millis()] [left] [right]&#60;/p&#62;
&#60;p&#62;this is a example&#60;/p&#62;
&#60;p&#62;1332	-4	58&#60;br /&#62;
1363	57	57&#60;br /&#62;
13951523	55	22&#60;br /&#62;
1554	52	-8&#60;br /&#62;
1586	54	-10&#60;/p&#62;
&#60;p&#62;specifically the bit in the middle where it has just dropped like 100ms...&#60;/p&#62;
&#60;p&#62;is it possible to disable specific interrupts? USB is not connected so that should not be an issue, systick might though.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>robodude666 on "weird lag spots"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1285#post-7767</link>
			<pubDate>Wed, 18 Jan 2012 13:24:56 +0000</pubDate>
			<dc:creator>robodude666</dc:creator>
			<guid isPermaLink="false">7767@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;As gbulmer said, the USB interrupts and systick timers are known to cause small delays in execution.&#60;/p&#62;
&#60;p&#62;For example, in the &#60;a href=&#34;https://github.com/leaflabs/libmaple/blob/master/examples/vga-scope.cpp&#34;&#62;VGA Scope&#60;/a&#62; example file they had to be disabled in order to make sure the video image is sent without interruption. They both causes minor delays that would disrupt the image (see comments in the example file).&#60;/p&#62;
&#60;p&#62;Try turning them off and see if it helps?&#60;/p&#62;
&#60;p&#62;Also, if you're using Interrupts please note that there is an overhead for timer-based interrupts.&#60;/p&#62;
&#60;p&#62;An example of what communications are experiencing delays, and how they're being triggered might help in the analysis of this issue. &#60;/p&#62;
&#60;p&#62;-robodude666
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "weird lag spots"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1285#post-7754</link>
			<pubDate>Tue, 17 Jan 2012 21:57:44 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">7754@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;How big is the lag?&#60;br /&#62;
By default, there will be a periodic Systick timer interrupt, and maybe a USB interrupt.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cyberia on "weird lag spots"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1285#post-7747</link>
			<pubDate>Tue, 17 Jan 2012 18:11:18 +0000</pubDate>
			<dc:creator>cyberia</dc:creator>
			<guid isPermaLink="false">7747@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I am using a maple r5 with an xbee reporting back data and every now and then i get a strange &#34;gap&#34; in reporting where it will stop halfway through the packet and restart after a delay with a new one.&#60;/p&#62;
&#60;p&#62;as far as i can tell this delay is happening on-board the maple and I have observed behaviour which might indicate this in other applications.&#60;/p&#62;
&#60;p&#62;am i doing it wrong, or is there some intermittent system overhead that can cause this to happen?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
