Gpio Mapping


Squidge

Certified Guru
Joined
Nov 16, 2003
Messages
8,493
Location
UK
Website
Visit site
I originally posted this in another thread, but it'll probably be best in it's own:

Code:
     C10 <Left Shoulder>            <Right Shoulder> C11

                                              C15
      M1   M0   M7                               Y
      M2  D11   M6   < Joystick            C12 A   B C13
      M3   M4   M5                               X
                                              C14
      D6   D7
      < Vol >                             Sel Start
                                          C9  C8

Letters state which GPIO button is connected to, number states which bit in that GPIO. 
All buttons are active low.

Other things:
I14 high when no SD inserted. Low when SD inserted.
D1 UARTx receive byte indication (PC->GP2X)
L0-3 SD 4-bit access? 

(UART refers to one connected by gph provided serial/jtag board)
 
Yep, that's the same as what I got :)

Also, D2 is a kind of "card inserted" signal from the SD slot.

It is low when a card is:
- half-inserted
- fully-inserted and unlocked

It's high when a card is:
- not inserted at all
- fully inserted but locked

So I guess we could set up D2 to give an event of some kind when it goes low and then check whether a card is inserted by trying to initialise it, and then when a card is inserted, reading D2 to tell the lock signal.
 
It would also seem the joypad can be pressed as a button and might report something back, squidge you should know tomorrow ;)

-Craig
 
Guess what? I go back work tomorrow after 4 days off :(

And guess what happened this afternoon?

Node CRC ffffffff != calculated CRC f09e7845 for node at 0164757c

Trying to boot linux after a required reset due to the sd driver locking up after insertion of sd card.

Further resets gets this:

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0024: 0xd45a instead
Further such events for this erase block will not be printed
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 0, bad_blocks 7, c->nr_blocks 1536
Kernel panic: VFS: Unable to mount root fs on 1f:03

I guess that means I'm the same boat as DJWillis now regarding this board...
 
Squidge posted on Oct 13 2005 at 09:21 PM said:
I guess that means I'm the same boat as DJWillis now regarding this board...

I unbricked mine but only by using a disk image I built using the ME dev tools and some hacking about so I have no MMC/SD device and am missing a few other interesting devices at present. I can't seem to get the GPH disk image to 'stick' propperly no matter what I do (and 3.5hr cycles to upload via serial are not fun) ;). Still, I have it running a little MP3 player and some bits and bobs so I feel 'slightly' more productive.
 
Last edited by a moderator:
craigix posted on Oct 14 2005 at 07:25 AM said:
It would also seem the joypad can be pressed as a button and might report something back, squidge you should know tomorrow ;)

-Craig

Well now! you're absolutely right :) D11 is the joystick button.

Of course, these could all be different in the final hardware...
 
Last edited by a moderator:
Robster posted on Oct 14 2005 at 09:12 AM said:
Well now! you're absolutely right :) D11 is the joystick button.

Don't tell me GPH did something above and beyond, cool :).

Hmmm, well there own SDL hack does not support it (shock ;)) but what do I care, another button is always good.

Thanks for finding that out Rob (and Craig), I'll try using it in an app over the weekend as I want to try and get something to show for this other then playing 'lets break the NAND' ;).
 
Last edited by a moderator:
you might want to report this extra button to the open forum monkeys :)
 
Inopia posted on Oct 14 2005 at 10:45 AM said:
you might want to report this extra button to the open forum monkeys :)

Could do but as GPH have not as yet supported it (or even realise it's there ;)) they may balls it up on final hardware. Once Squidge has checked on the final PCB I think we could let it slip ;).
 
Last edited by a moderator:
Updated mappings (see top post).

Added: Shoulder buttons, Joystick press, SD card insert notification, UART byte receive notification, possible SD access io's.
 
You should point this out to GPH. According to their SDL port the mapping for the stick goes, from 0 to 7, up, up-left, up-right, down, down-left, down-right, left, right. And the buttons are just as badly mapped. It's just a complete coincidence that the mapping out from SDL for the stick works in the same anti-clockwise way as the hardware :).
 
Back
Top