We've been at this for hours and we still have nothing:
- After spending a lot of time figuring out the pinout, does J16 look like this (from top down):
1 2
3 4
5 6
...
47 48
49 50
This is the only numbering scheme in which things make sense for us, please confirm.
- We have implemented the experimental driver provided by Glomation for accessing GPIO. In both the driver as-provided and our own modified version, changing the value of a pin reports back successfully, but nothing happens on the J16 connector (the values do not change).
Can Glomation look in to this? This is a rather urgent problem for us, and it's disappointing that something as simple as GPIO doesn't work out of the box.
Here is a test output from our test app, for what it's worth:
GESBC:/GPIO# ./gpio-test.o
AT91_PIN_PB29 (TRIGGER) = 1
AT91_PIN_PB30 (RELOAD) = 1
AT91_PIN_PB31 (ZOOM) = 1
AT91_PIN_PC0 (SEG0_3) = 1
AT91_PIN_PC1 (SEG0_2) = 1
AT91_PIN_PC2 (SEG0_1) = 1
AT91_PIN_PC3 (SEG0_0) = 1
AT91_PIN_PC4 (SEG1_3) = 0
AT91_PIN_PC5 (SEG1_2) = 0
AT91_PIN_PC6 (SEG1_1) = 0
AT91_PIN_PC7 (SEG1_0) = 0
+PC4
GESBC:/GPIO# ./gpio-test.o
AT91_PIN_PB29 (TRIGGER) = 1
AT91_PIN_PB30 (RELOAD) = 1
AT91_PIN_PB31 (ZOOM) = 1
AT91_PIN_PC0 (SEG0_3) = 1
AT91_PIN_PC1 (SEG0_2) = 1
AT91_PIN_PC2 (SEG0_1) = 1
AT91_PIN_PC3 (SEG0_0) = 1
AT91_PIN_PC4 (SEG1_3) = 0
AT91_PIN_PC5 (SEG1_2) = 0
AT91_PIN_PC6 (SEG1_1) = 0
AT91_PIN_PC7 (SEG1_0) = 0
Between polls we tried changing PC4 to 1, which clearly does not work. Checking pins PC0 through PC7 is also confusing, as they definitely do not actually have voltages reflecting the 1,1,1,1,0,0,0,0 pattern as reported by the driver. All that aside, setting +PC0, +PC1, +PC2... etc do not seem to have any effect on the corresponding pins (all pins are zero in reality).
We have attached our driver code.
[edit] We have also alternatively tried using mmap to get GPIO working. We've attached the source for this as well. The mmap operation fails with (-EINVAL), but I simply cannot figure out what's wrong.
«
Last Edit: March 17, 2009, 02:28:00 AM by Jerry Wong »