Skip to main content
Visitor II
December 10, 2004
Question

GPIO on the Vega

  • December 10, 2004
  • 5 replies
  • 922 views
Posted on December 10, 2004 at 13:07

GPIO on the Vega

    This topic has been closed for replies.

    5 replies

    hpeacockAuthor
    Visitor II
    September 13, 2004
    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?
    Visitor II
    September 15, 2004
    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
    hpeacockAuthor
    Visitor II
    September 22, 2004
    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.
    Visitor II
    November 1, 2004
    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.
    hpeacockAuthor
    Visitor II
    December 10, 2004
    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.