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.
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
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.
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.
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.
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.
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.
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.
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?
I'm not sure about 2.6.10 kernel. You can download the codesourcery toolchain from codesourcery website. This link explains it all.
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.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.