2004-12-10 04:07 AM
2004-09-13 07:30 AM
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?2004-09-15 02:01 AM
hi,
There is a new version of the programming manual available online where you can find the correct data. Thanks. STPC Team2004-09-22 04:40 AM
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.2004-10-31 05:28 PM
Hello
I have a STPC VEGA chip - STPCV1JEBC (engineering sample) and GPIO registers has 0x0320 - 0x0327 address range. Best regards.2004-12-10 04:07 AM
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.