cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO on the Vega

hpeacock
Associate II
Posted on December 10, 2004 at 13:07

GPIO on the Vega

5 REPLIES 5
hpeacock
Associate II
Posted on September 13, 2004 at 16:30

Does anyone know how to use the integrated GPIO on the Vega. The documentation in the programmers manual is unclear and (to me at least) contradictory.

Specifically, the GPIO appears to be mapped into PCI I/O space with a base address available from PCI configuration space. However, the supposed location of that base address is register 0x44, and the greatest register number in configuration space (as accessed by 0xCF8/0xCFC) is 0x3f.

What am I missing?
anouar
Associate II
Posted on September 15, 2004 at 11:01

hi,

There is a new version of the programming manual available online where you can find the correct data.

Thanks.

STPC Team
hpeacock
Associate II
Posted on September 22, 2004 at 13:40

The new version of the programming manual does not provide any additional information about the GPIO than the previous manual.

Could anyone please provide me with a code snippet that illustrates the VEGA GPIO usage?

Thanks.
granitvt
Associate II
Posted on November 01, 2004 at 02:28

Hello

I have a STPC VEGA chip - STPCV1JEBC (engineering sample) and GPIO registers has 0x0320 - 0x0327 address range.

Best regards.
hpeacock
Associate II
Posted on December 10, 2004 at 13:07

This is the solution that I came up with for using GPIO on the Vega:

(this message is in response to my original post)

1: Get the base address for the GPIO from the PCI configuration area

using the ISA bridge configuration space (bus 0, device 0x0c, function 0).

outl(0x80006044, 0xcf8);

addr = inl(0xcfc) - 1;

I don't know the reason for subtracting 1 - it was the way that base addresses

were fetched in the SDK and it appears to work.

2. Turn on the GPIO in the Miscellaneous register in south bridge configuration space.

outl(0x80006040, 0xcf8);

outb(2, 0xcfc);

3. Use the GPIO with the base address.

gpioValue = inb(addr + 6);

Reading the GPIO configuration at boot time (at register BASE + 7)

did not appear to work. This may be because of incomplete setup

or because I am using an early version of the Vega.