<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.8.1">
</HEAD>
<BODY>
Sorry for wasting bandwidth (again).&nbsp; Turns out my schematic is for an earlier spin of the board.<BR>
<BR>
regards,<BR>
Ben<BR>
<BR>
On Mon, 2006-04-10 at 15:06 -0500, Kumar Gala wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">On Apr 10, 2006, at 2:48 PM, Ben Warren wrote:</FONT>

<FONT COLOR="#000000">&gt; Hello,</FONT>
<FONT COLOR="#000000">&gt;</FONT>
<FONT COLOR="#000000">&gt; I'm a noobie to this CPU, and am utterly confused with how the bits  </FONT>
<FONT COLOR="#000000">&gt; are</FONT>
<FONT COLOR="#000000">&gt; ordered on the GPIO ports.  I imagine it's the same as all Freescale</FONT>
<FONT COLOR="#000000">&gt; PPCs, but who knows.  Anyway...</FONT>
<FONT COLOR="#000000">&gt;</FONT>
<FONT COLOR="#000000">&gt; Using an MPC8349MDS eval board, I have one LED to play with.  From the</FONT>
<FONT COLOR="#000000">&gt; schematic, it's connected to GPIO1[1].  From other processors that  </FONT>
<FONT COLOR="#000000">&gt; I've</FONT>
<FONT COLOR="#000000">&gt; worked with, I would have expected to toggle it with either 0x40000000</FONT>
<FONT COLOR="#000000">&gt; (IBM 405) or 0x00000002 (68360).  Nope.  To make this bit move, I mess</FONT>
<FONT COLOR="#000000">&gt; with bit 0x00000040 in the appropriate DAT register.  This leads me to</FONT>
<FONT COLOR="#000000">&gt; believe that either the bit ordering is something</FONT>
<FONT COLOR="#000000">&gt; like ...89abcdef01234567 (sorry for the confusing notation, but</FONT>
<FONT COLOR="#000000">&gt; hopefully it makes sense) or the schematic has a typo.  Since I'm  </FONT>
<FONT COLOR="#000000">&gt; trying</FONT>
<FONT COLOR="#000000">&gt; to write a generic GPIO handler, I'd like to have a little  </FONT>
<FONT COLOR="#000000">&gt; confidence in</FONT>
<FONT COLOR="#000000">&gt; my extrapolation from a single point.</FONT>
<FONT COLOR="#000000">&gt;</FONT>
<FONT COLOR="#000000">&gt; Can anybody shed some light on this?</FONT>

<FONT COLOR="#000000">This is because the Freescale docs are misleading.  If you look at  </FONT>
<FONT COLOR="#000000">the schematic you will see the LED is wired to GPIO1[5] which makes  </FONT>
<FONT COLOR="#000000">sense for the 0x40 value you have to use.</FONT>

<FONT COLOR="#000000">- kumar</FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>