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

		<item>
			<title>x893 on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215&amp;page=2#post-1684</link>
			<pubDate>Wed, 06 Oct 2010 14:47:45 +0000</pubDate>
			<dc:creator>x893</dc:creator>
			<guid isPermaLink="false">1684@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Can you use debugger for hard test ? Try it and you know all aspects of communication (or use simplest device like usbee.com to view protocol - it's very easy to DIY)&#60;br /&#62;
like this&#60;br /&#62;
&#60;a href=&#34;http://akb77.com/g/files/media/1.jpg&#34; rel=&#34;nofollow&#34;&#62;http://akb77.com/g/files/media/1.jpg&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215&amp;page=2#post-1680</link>
			<pubDate>Wed, 06 Oct 2010 13:59:28 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">1680@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I have a 15 second delay from bootloader switching to running flash and when the program does anything, maybe I'll initialise the SPI and pins before using that delay.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>perry on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215&amp;page=2#post-1677</link>
			<pubDate>Wed, 06 Oct 2010 12:22:57 +0000</pubDate>
			<dc:creator>perry</dc:creator>
			<guid isPermaLink="false">1677@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;hey crenn,&#60;/p&#62;
&#60;p&#62;I managed to fry one xl345 I had last night so I couldn't actually test it, but I did look at the SPI signals coming out of both SPI1 and SPI2 on a logic analyzer and they appear to be correct, so I'm not sure why it doesn't work on SPI1.&#60;/p&#62;
&#60;p&#62;My initial guess might be that the powerup/startup sequence on the XL345 may be confused by the led pin from the bootloader? I'm pretty sure the GPIO pins are set as input floating at reset, so perhaps noise on those lines are triggering /CS or SCK and confusing the xl345? Without another xl345 I'm not sure I can help much more.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215&amp;page=2#post-1653</link>
			<pubDate>Tue, 05 Oct 2010 14:41:57 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">1653@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I'm now using libmaple included with v0.0.7, but I was using v0.0.6 with some of the updates from github.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215&amp;page=2#post-1652</link>
			<pubDate>Tue, 05 Oct 2010 14:41:41 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">1652@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;xl345 test rig is available...probably still set up from I2C testing
&#60;/p&#62;</description>
		</item>
		<item>
			<title>perry on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215#post-1650</link>
			<pubDate>Tue, 05 Oct 2010 14:33:19 +0000</pubDate>
			<dc:creator>perry</dc:creator>
			<guid isPermaLink="false">1650@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;curious. which version of libmaple are you using? perhaps the mode bits are being set incorrectly for SPI mode 3? that would probably cause exactly what you're looking at, a 1-bit offset.&#60;/p&#62;
&#60;p&#62;i can't look at this until I get home, but I think we might have an ADXL345 somewhere around that we can hook up... poslathian?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215#post-1648</link>
			<pubDate>Tue, 05 Oct 2010 14:25:59 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">1648@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Ill have to break out my xl345 to say one way or the other. Will post more on this later. But a frameshift is better than say, garbage.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215#post-1646</link>
			<pubDate>Tue, 05 Oct 2010 14:14:40 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">1646@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;So it's going to be a fairly easy fix?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215#post-1644</link>
			<pubDate>Tue, 05 Oct 2010 14:07:44 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">1644@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;ahh, this indicates a clear problem. devID should be E5, a standard sanity check (I hate devices without read ports for just this reason, common with CODEC chips).&#60;/p&#62;
&#60;p&#62;fyi: 0xE5 = 0b11100101&#60;br /&#62;
     0xCB = 0b11001011&#60;/p&#62;
&#60;p&#62;     looks like the frame is off by 1 (shift left 1). This is a good sign - indicating some minor timing shift.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215#post-1643</link>
			<pubDate>Tue, 05 Oct 2010 13:53:57 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">1643@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;perry, the readout for the Z-axis data is correct (it needs to be biased in software or write to the sensor's offset register), however the initialisation of the sensor is strange which is what concerned me. I wrote 28 to Register 2D (Power Control) and when I read it back, it came back as 10. And then when it read the Device ID, it didn't return E5, it returned CB.&#60;/p&#62;
&#60;p&#62;EDIT: I don't own a scope, but can probably get access to one in my lab tomorrow.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215#post-1617</link>
			<pubDate>Tue, 05 Oct 2010 10:47:55 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">1617@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;~200 is a reasonable output for z axis if its not at a perfect perpendicular angle to gravity. I usually read 180~ with right justified output and fullscale resolution.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>perry on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215#post-1615</link>
			<pubDate>Tue, 05 Oct 2010 10:41:00 +0000</pubDate>
			<dc:creator>perry</dc:creator>
			<guid isPermaLink="false">1615@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hey crenn,&#60;/p&#62;
&#60;p&#62; I don't know enough about the xl345 to be able to tell what those readouts are supposed to be saying, but it looks like from your log that the XL345 is responding and giving you data. Is it not the right data? Your Z-axis data looks to be ~200 in both sets.&#60;/p&#62;
&#60;p&#62;If it's in fact not correct on SPI1, can you scope the outputs to see if anything is obviously wrong? I've been using SPI1 quite reliably at 18MHz on a wishield, so I'm sure we can make it work.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215#post-1604</link>
			<pubDate>Tue, 05 Oct 2010 08:27:07 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">1604@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;If perry's notion turns out to be incorrect, this is not the first spooky interaction issue between various peripherals. For instance, I have seen Timer3 destroy SerialUSB...not sure why. I'll mark this down.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215#post-1603</link>
			<pubDate>Tue, 05 Oct 2010 07:53:57 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">1603@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;When I was developing the functions to access the ADXL, I had nothing else connected. When I was using a Servo and the sensor today, I was only using Timer4. I can test the patch, but I don't believe it would solve my problems.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>perry on "Problems with SPI and AXDL345"</title>
			<link>http://forums.leaflabs.com/topic.php?id=215#post-1602</link>
			<pubDate>Tue, 05 Oct 2010 02:55:42 +0000</pubDate>
			<dc:creator>perry</dc:creator>
			<guid isPermaLink="false">1602@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;hi crenn&#60;/p&#62;
&#60;p&#62;are you using pwm on any of the timer 3 channels by any chance? there's a bug in the timer code that enables all the timers by default and two of the timer pins conflict with spi1. i fixed it on a branch but haven't pushed the change yet to master.&#60;/p&#62;
&#60;p&#62;if this is the case i'll send you a patch and maybe you can test it?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
