Project

General

Profile

Cannot Toggle GPIO pin

Added by Spencer Mayott about 12 years ago

I'm running a MitydspL138 on the Industrial IO board, and I'm trying to set GPIO0_13 via echoing directions and values to /sys/class/gpio13/. When I build the kernel against the industrialio_defconfig, I can set the direction to in or out, but I cannot get the output value to change, it seems stuck at 0. However, when I build the kernel against the mitydspl138testfix_defconfig, I can change both the direction and the value of GPIO0_13. I don't understand why it will only work on one and not the other, because both baseboard-insdustrialio.c and baseboard-testfix.c both include "DA850_GPIO0_13" in the array that is passed as the argument for the davinci_cfg_reg_list function. Any thoughts on what might be causing the gpio not to work properly?


Replies (3)

RE: Cannot Toggle GPIO pin - Added by Spencer Mayott about 12 years ago

Some funky formatting happened with the gpio name. Just for clarification its GPIO 0_13.

RE: Cannot Toggle GPIO pin - Added by Michael Williamson about 12 years ago

Hi Spencer,

The issue is that the MCASP (see baseboard-industrialio.c) setup is configuring that pin to be in AFSR mode.

I will submit a patch to the 3.2 kernel (which one are you using?) to fix this, but a quick work around if you don't need audio is to comment out the baseboard_setup_mcasp() routine. Otherwise, you'll need to modify the baseboard_mcasp_pins[] array and change that entry to the GPIO 0/13 setting.

Sorry about that. Fixing that up has been on my todo list for some time now.

-Mike

RE: Cannot Toggle GPIO pin - Added by Spencer Mayott about 12 years ago

Thanks for your speedy reply. I'm using 3.2 from the 2012-08-10 MDK.

    (1-3/3)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)