• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » DaVinci™ Video Processors » DM64x DaVinci Video Processor Forum » I/O Pins on Davinci board through code/linux command
Share
DaVinci™ Video Processors
  • Forums
  • Announcements
Options
  • Subscribe via RSS

Forums

I/O Pins on Davinci board through code/linux command

This question is not answered
Vamsi Subhash Achanta
Posted by Vamsi Subhash Achanta
on Jun 08 2012 09:01 AM
Prodigy50 points

Hi,

I am new to the Davinci DM6446 board. I am able to boot into the Montavista linux and able to turn the LED on or off. But I don't know how to use the I/O pins to send a constant 5V DC supply. Where are the I/O pins? How to program them? Please help.

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Renjith Thomas
    Posted by Renjith Thomas
    on Jun 14 2012 13:28 PM
    Guru23890 points

    Vamsi,

    What are you trying to achieve here? The GPIO pins can be figured by going through the schematics for the board, which is available in spectrum digital website.

    -Renjith | www.pathpartnertech.com | Verify the answer if you think your query is resolved

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vamsi Subhash Achanta
    Posted by Vamsi Subhash Achanta
    on Jun 14 2012 13:49 PM
    Prodigy50 points

    I am trying to access the GPIO pins using c program. I am using /dev/port or /dev/mem. I am able to write to the location of DC2 3rd pin => GPIOV33_0 pin. But the ENET_ENABLE of DC2 which is pin 27 is to be set to enable GPIO for DC2. But there is no address for ENET_ENABLE is given in the manual.

    I am very novice user. Can you give me a sample program to access a GPIO pin and how to set a pin high/low? I am trying this for the past week and not able to figure out. There is no /sys/class/gpio available on my DSP linux and I don't want to recompile kernel now.

    Thanks for your reply.  Please help me.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Renjith Thomas
    Posted by Renjith Thomas
    on Jun 15 2012 02:20 AM
    Guru23890 points

    Vamsi,

    If you are particular in not compiling kernel, you can try using this small app named devmem2 and using which you directly read/write GPIO registers and control. The source for the application is given below. 

    http://www.lartmaker.nl/lartware/port/devmem2.c

    -Renjith | www.pathpartnertech.com | Verify the answer if you think your query is resolved

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vamsi Subhash Achanta
    Posted by Vamsi Subhash Achanta
    on Jun 15 2012 09:09 AM
    Prodigy50 points

    Hi,

    Thanks for your reply. I used your program. I am able to write. But the GPIO pin is not activated as the ENET_ENABLE of DC2 is not enabled. I am unable to find the address of ENET_ENABLE. I was able to write to the location of GPIO23 previously.

    DIR23 set to 0 for output => ./devmem2 0x01c67038 w 0

    SET_DATA23 set to 0xffffffff => ./devmem2 0x01c67040 w 0xffffffff

    Even if I do the above, the GPIO pin (pin3 of DC2) is not set high.

    Is compiling kernel easy? How to do it to activate /sys/class/gpio?

    Please help me.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Renjith Thomas
    Posted by Renjith Thomas
    on Jun 15 2012 14:34 PM
    Guru23890 points

    Vamsi,

    You check the PINMUX settings whether GPIO23 is muxed with the EMIF pin EM_A8. If its so, you've to change it to GIO. Check the PINMUX register settings.

    To compile kernel, you can follow some instructions in the wiki pages available for building Linux. To enable sys/class/gpio you can follow the below link.

    https://www.ridgerun.com/developer/wiki/index.php/How_to_use_GPIO_signals

    -Renjith | www.pathpartnertech.com | Verify the answer if you think your query is resolved

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vamsi Subhash Achanta
    Posted by Vamsi Subhash Achanta
    on Jun 18 2012 07:13 AM
    Prodigy50 points

    Thanks for you reply Renjit.

    What is the difference between GPIO and GIO? I have considered GIOV33_0 as a GPIO pin.

    Sorry I was referring to the GIOV33_0 pin. I need to set it to high. The pin is in DC2. For that I need to enable ENET_ENABLE (which is pin 27 of DC2) to 1. But how to do that?

    Please help me. I need to access GIOV33_0 pin. I have it's address.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Renjith Thomas
    Posted by Renjith Thomas
    on Jun 18 2012 09:22 AM
    Guru23890 points

    GIO and GPIO is the same abbreviation used for General Purpose IO pins. You can try to use the sys/class/gpio if the pins are available.

    -Renjith | www.pathpartnertech.com | Verify the answer if you think your query is resolved

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vamsi Subhash Achanta
    Posted by Vamsi Subhash Achanta
    on Jun 19 2012 05:17 AM
    Prodigy50 points

    Hi,

    I tried recompiling the kernel. The DM6446 board has Montavista v4. The kernel version is 2.6.10. There is not GPIO under Device Drivers section. I downloaded the latest kernel source from http://gitorious.org/linux-davinci but the toolchain is not able to compile the new kernel. Why is GPIO not there under the kernel given in the toolchain cd? How to proceed now?

    Please help me.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Renjith Thomas
    Posted by Renjith Thomas
    on Jun 19 2012 09:17 AM
    Guru23890 points

    Vamsi,

    I'm not sure about 2.6.10 kernel. You can download the codesourcery toolchain from codesourcery website. This link explains it all.

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

    -Renjith | www.pathpartnertech.com | Verify the answer if you think your query is resolved

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use