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