OMAP5912 OSK & GPIO
A message that is not in the archive (sent off-list or not yet received): [email protected]
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.
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