<?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: help with Wire..</title>
		<link>http://forums.leaflabs.com/topic.php?id=1312</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:20:52 +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=1312" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312&amp;page=2#post-8137</link>
			<pubDate>Wed, 08 Feb 2012 12:03:53 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">8137@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;crenn - yes that is close to my understanding too.&#60;br /&#62;
The major different between the STM32F2 and STM32F4 core is the single-cycle floating point unit.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312&amp;page=2#post-8134</link>
			<pubDate>Wed, 08 Feb 2012 08:16:16 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">8134@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;My understanding of the F2 and the F4 series is that only the core of the processor has been changed from Cortex M3 to Cortex M4 apart from a few other minimal changes. It's how the F2 and F4 are so interchangeable. (pin to pin compatibility)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312&amp;page=2#post-8132</link>
			<pubDate>Wed, 08 Feb 2012 07:05:06 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">8132@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;crenn - For clarity, I haven't tested the I2C on the STM32F4. I am working on very different stuff for the next couple of months.&#60;br /&#62;
If I've understood the ST Micro presentation (I attended last year), peripherals, including the I2C, on both the F2 and F4 should be extremely close in behaviour.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312&amp;page=2#post-8131</link>
			<pubDate>Wed, 08 Feb 2012 06:58:29 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">8131@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Good to hear it's working for you, there might be some additional overhead in the library (which is part of the reason why the library is being rewritten) due to trying to support multiple interfaces.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;crenn - have you got access to an STM32F4-DISCOVERY? Have you tried the hardware I2C on that?&#60;br /&#62;
STM32F4 gets its I2C peripheral hardware from STM32F2, so it might 'just work'. &#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;I do have a STM32F4-DISCOVERY now, although I haven't started developing code for it yet, although you've just reminded me I have basically the perfect test bed for a PCB I'm designing for a RC Transmitter board based around the STM32F2.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312&amp;page=2#post-8130</link>
			<pubDate>Wed, 08 Feb 2012 06:57:49 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">8130@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;cren - have you got access to an STM32F4-DISCOVERY? Have you tried the hardware I2C on that?&#60;br /&#62;
STM32F4 gets its I2C peripheral hardware from STM32F2, so it might 'just work'.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>lucky13 on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312#post-8128</link>
			<pubDate>Wed, 08 Feb 2012 06:48:22 +0000</pubDate>
			<dc:creator>lucky13</dc:creator>
			<guid isPermaLink="false">8128@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;@gbulmer thank you for your answer, that cleared my mind with i2c.&#60;/p&#62;
&#60;p&#62;@crenn iv tryed your code and so far it seems to work pretty good!Thank you! With ala42 code i was reading each sensor  in 285uS and with your code in 231uS. Not big difference but i think this is the shortest time to read 6 bytes from the sensors. According to gbulmer, in 400khz you read each byte in 20uS, so for 6bytes its 120uS and other 120uS to return the bytes.. So it look pretty good for me now..&#60;/p&#62;
&#60;p&#62;Thank you guys!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312#post-8127</link>
			<pubDate>Wed, 08 Feb 2012 06:35:20 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">8127@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I think I have that thread opened in a tab somewhere (I have a lot of tabs open related to Wire and I2C from this forum), not wanting to turn this thread off topic, I'll only say that the new SoftWire will be improving the performance of the software implementation from the various bits from threads here, authors will of course be credited.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312#post-8124</link>
			<pubDate>Wed, 08 Feb 2012 06:24:47 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">8124@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;cren - gke reported his soft I2C library &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=1255#post-7524&#34; rel=&#34;nofollow&#34;&#62;http://forums.leaflabs.com/topic.php?id=1255#post-7524&#60;/a&#62;&#60;br /&#62;
reached 350K.&#60;br /&#62;
It was using some of the slow libmaple functions (much faster than digitalWrite, but still significantly slower than the STM32F can go)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312#post-8122</link>
			<pubDate>Wed, 08 Feb 2012 06:05:34 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">8122@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;If I recall from previous posts, the software I2C implementation (I can't remember if ala42's fix fixes this issue) runs the I2C at 88kHz which is allowable.&#60;/p&#62;
&#60;p&#62;The only reliable way of having 400kHz is to use the I2C hardware available on the STM32F103 present on the Maple. There is an 'old' version of a version of the wire library to provide a Wire implementation here: &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=1033&#34; rel=&#34;nofollow&#34;&#62;http://forums.leaflabs.com/topic.php?id=1033&#60;/a&#62; (it's currently being changed, more on that later in the thread). If you have problems getting it to work, then post back here and I'll try to get back to you as soon as possible.&#60;/p&#62;
&#60;p&#62;The only line you should need to change is the Wire.begin() line and put it as instead:&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
&#60;blockquote&#62;Wire.begin(0x00, PORTI2C2, I2C_FAST_MODE);&#60;/blockquote&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;EDIT: Just in case you're wondering, all of the devices on your IMU work at I2C Fast Speed.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312#post-8111</link>
			<pubDate>Tue, 07 Feb 2012 16:55:16 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">8111@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;As siy wrote, I2C runs at 400KHz high, and 100KHz standard. At best that is 2.5us/bit, or 20us/byte.&#60;/p&#62;
&#60;p&#62;Each I2C transaction has an address byte, maybe a command or data byte, then the data line has to turn around to return data bytes. So the thing that determines speed is the I2C interface. Processor speed is a small part. So even if the processor were infinitely fast, the whole process will only go as fast as the I2C.&#60;/p&#62;
&#60;p&#62;Where you might get some benefit is if I2C uses the I2C peripheral hardware, and the I2C peripheral is used with DMA. Then the processor should be (mostly) free to do other things, and get an interrupt when something has completed. &#60;/p&#62;
&#60;p&#62;Of course, if there is nothing else to do ...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>lucky13 on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312#post-8109</link>
			<pubDate>Tue, 07 Feb 2012 16:20:16 +0000</pubDate>
			<dc:creator>lucky13</dc:creator>
			<guid isPermaLink="false">8109@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Very close to my readings for each sensor..&#60;br /&#62;
So you think that we cant get any faster readings from those sensors with the F1?&#60;br /&#62;
Btw the thing that had huge difference was the DCM calculation time..almost 7 times faster in maple!!=D
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ala42 on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312#post-8104</link>
			<pubDate>Mon, 06 Feb 2012 20:22:09 +0000</pubDate>
			<dc:creator>ala42</dc:creator>
			<guid isPermaLink="false">8104@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Reading 6 byte from ITG3200 and BMA180 takes 254µs for each sensor with my Wire lib and the AeroQuad code on a 72MHz F1 CPU.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>siy on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312#post-8089</link>
			<pubDate>Mon, 06 Feb 2012 09:52:27 +0000</pubDate>
			<dc:creator>siy</dc:creator>
			<guid isPermaLink="false">8089@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I don't know how many bytes are sent during conversation with sensor, but I guess that time is defined by the I2C bus clock speed (which is only 100kHz standard and 400kHz &#34;high&#34;). Probably there are some ways to overclock bus, but it will be exactly that - overclocking with all kinds of possible consequences.&#60;/p&#62;
&#60;p&#62;By the way, if memory serves me correctly bus lines pull up resistors should be 4.7K.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>lucky13 on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312#post-8088</link>
			<pubDate>Mon, 06 Feb 2012 08:38:35 +0000</pubDate>
			<dc:creator>lucky13</dc:creator>
			<guid isPermaLink="false">8088@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Another question.. =p&#60;br /&#62;
Ive noticed that the maple takes about 571us in order to read the accel and the gyro. With the same test the arduino mega takes 672us to do the same thing..&#60;br /&#62;
I was expecting a shorter time from the maple..&#60;br /&#62;
Am i wrong?&#60;br /&#62;
Any thoughts about making the readings faster?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>lucky13 on "help with Wire.."</title>
			<link>http://forums.leaflabs.com/topic.php?id=1312#post-8048</link>
			<pubDate>Fri, 03 Feb 2012 14:36:09 +0000</pubDate>
			<dc:creator>lucky13</dc:creator>
			<guid isPermaLink="false">8048@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;RESPECT!&#60;br /&#62;
thank you one more time ala for your help!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
