Skip to contentSkip to conversation

OMAP5912 OSK & GPIO

DISCUSSION Richard Copeman 2 participants 2 messages May 24, 2006 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi,

Does anybody have any examples for configuring and using the GPIO pins? I'm trying to toggle GPIO7. I set the data direction bit to output and set the output pin register bit to high. I have not changed the default pin muxing, so I assume I should be getting a signal on pin L15, which according to my schematics is pin 25 on connector P12. I put a scope on there and don't see anything ;-(

Am I missing some vital part of the puzzle?

Thanks,

Richard.

#2 lore raw
Quoted 8 lines · Richard Copeman

Hi,

Does anybody have any examples for configuring and using the GPIO pins? I'm trying to toggle GPIO7. I set the data direction bit to output and set the output pin register bit to high. I have not changed the default pin muxing, so I assume I should be getting a signal on pin L15, which according to my schematics is pin 25 on connector P12. I put a scope on there and don't see anything ;-(

Try to use GPIO framework. See for example

/arch/arm/mach-omap1/leds.c
/arch/arm/mach-omap1/leds-osk.c

#include <asm/arch/gpio.h>
#include <asm/arch/mux.h>

omap_cfg_reg(P18_1610_GPIO3); // request pin from pinmux, depends on chip

if (omap_request_gpio(3) == 0)      // request GPIO
   omap_set_gpio_direction(3, 0);   // set it to output
omap_set_gpio_dataout(3, 1);        // set it

Regards

Dirk