Without reading deeply on my part..

It may be that some of the pins require a load to actually see a change.
Your voltmeter may not provide sufficient load to bring down a 3.3v pin
when it should be zero. 

The LED is a good test. Maybe use a similar LED as a test probe on the
other pins.

You can also inspect the source code of the GPIO driver to see what bits
on which hardware register correspond to the higher level software
commands. I would think that this aspect of the hardware/software
development didn't get a lot of testing and there may be bugs.

The hardware characteristics may also be different from the hardware
used originally to develop the GPIO driver. Some pins may not be like
other pins. The original usage (customer) of the chip may have
influenced the action of certain pins. Etc.

Bob G

On Sun, 2009-02-22 at 13:10 +0200, Lars Noodén wrote:
> Thanks.  The short version is it works very well now.
> 
> Bob Gustafson wrote:
> > I was going to say that the GPIO pins had been covered in previous 
> > postings to this list, but then I noticed you were one of those
> > posters - on Jan 24 or so.
> 
> Yep. Just a bit slow.
> 
> >  I believe the upshot of the postings was that the GPIO chip must have
> >  its pins enabled before they will be active...
> 
> Yes, that has to happen while OpenBSD is still in Securlevel 0.
> I'm not quite clear, however, which settings for gpioctl map to which
> pin on JP5.  Let me explain.
> 
> Here is an annotated excerpt from /etc/rc.secure:
> 
>       /usr/sbin/gpioctl gpio0 20 set out pp;  # error LED
>       /usr/sbin/gpioctl gpio1 16 set out pp;  # JP5 pin 3
>       /usr/sbin/gpioctl gpio1 18 set out pp;  # JP5 pin 5
>       /usr/sbin/gpioctl gpio1 20 set out pp;  # JP5 pin 7
>       /usr/sbin/gpioctl gpio1 22 set out pp;  # JP5 pin 9
> 
> so, with the above, I can toggle the onboard "Error" LED
> 
>       gpioctl gpio1 20 2
> 
> or pin 7 on JP5:
> 
>       gpioctl gpio1 20 2
> 
> However, my original confusion comes from how to map any of the above to
> what is in the Soekris manual in section 3.5 "JP5, User I/O"
> In that section of the manual the following pattern is given and I can't
> figure out any correlation between the numbers below and the numbers I
> found through trial and error above:
> 
>           A    B      C                 D
>       PC87366 Pin   Function          JP5 Pin
>       ------- ---   --------          -------
>           --      +3.3V Power          1
>       GPIO 20, 117   GPIO 0            3
>       GPIO 22, 119   GPIO 2            5
>       GPIO 24, 121   GPIO 4            7
>       GPIO 26, 123   GPIO 6            9
>           --         GND              11
>        GPIO 5, 7     GPIO 9           13
>       GPIO 13, 55    GPIO 10          15
>                      GND              17
>       SOUT 2,  107   TXD              19
> 
> Regards
> -Lars

_______________________________________________
Soekris-tech mailing list
[email protected]
http://lists.soekris.com/mailman/listinfo/soekris-tech

Reply via email to