This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GPIO example for dm814x's c6747

Hello,

I think I'm missing the forest for the trees: I want to toggle some GPIO Pins from a C6747 application on a DM814X. I've found some examples that mention many different CSLs, PSPs and whatnot, but I don't think that I need a multi-MB PSP to toggle a pin?

Currently I'm using EZSDK 5.05.02.00 and CGT 7.4.2 on linux (without CCS, just Makefiles and configuro)

Could you please give me some pointer?

Thanks,

  • Check the TRM sections on GPIO and pin muxing.

    You should be able to access the memory mapped registers directly to control the GPIO.

    Note, setting of the pin mux MAY need to be done from Kernel space so you might need to modify the Kernel/UBoot to set the GPIO pin mode.

    BR,

    Steve

  • Thank you, but

    - What's TRM? Could you please provide a link?

    -How do I access the registers? Do I need further ti packages, header files? Again, if so could you please provide a link?

    - I think a colleage of mine has set the muxes with some GEL file. Is this possible or do I remember wrong?

    Looking forward for further help :) ,

    thanks,

    Markus

  • I've found this here and I think with some adjustments to the TMS320DM814x I might be able to get the GPIOs wiggling ;)

    http://processors.wiki.ti.com/index.php/QuickStartOMAPL1x_rCSL

    I copied the ti/pspiom/cslr/ headers from the quick start and start to adjust what seems necessary from the GPIO example.

    But seriously: is this the way to go?

    Please give some feedback on this way of learning how to use GPIO in TI DSPs.

    Thank you very much,

    Markus

  • A Colleague of mine showed me how simple it can be:

    /** Setup */

        // set pins AF20 and AF21 to GPIO 12 and 13
        _amem4((UInt32*)0x08140A74)=0x000E0080;
        _amem4((UInt32*)0x08140A78)=0x000E0080;

        // set GPIO 12 and 13 as output
        _amem4((UInt32*)0x08032134)=0xFFFFCFFF;

    /** Wiggle with the GPIOS */

        _amem4((UInt32*)0x0803213C )=0x00003000;

  • Markus,

    TRM = Technical Reference Manual and should be available on the device TI product folder web page. If not please check with your local TI FAE/sales team.

    Registers can be accessed by simply de-referencing their address in C/C++. The TRM should point you to the correct address.

    You should be able to either directly calculate/assign the address or use existing headers if you want to use named variables/definitions. I am not a software person so cannot tell you which headers to include. sorry.

    BR,

    Steve

  • Markus,

    The OMAPL1x devices are completely different devices. In addition I do not believe the CSL libraries are the same as for the DM devices (not even sure DM HAS CSL).

    BR,

    Steve

  • Markus,

    As I said... "access the memory mapped registers directly to control the GPIO" :) The key though is in finding what those addresses are, which your colleague was able to help you with.

    Glad you are now working, and faster :)

    BR,

    Steve

  • Markus,

    You can also have a look in the wiki page below, it might help:

    http://processors.wiki.ti.com/index.php/GPIO_Driver_Guide

    BR
    Pavel