Other Parts Discussed in Thread: OMAPL138
Hi,
I am having OMAPL138 custom board, for one of my applications, I want to make the GP2[9] functionality as output and need to make the value high. The GP 2[9 ] pin drives the peripheral and the line is pulled up.
Here are the code, i have used in the board file. Tried the below possibilities, but the output pins is not going high anymore, verified the behavior in scope.
#define DAVINCI_GPIO_BASE (0x01c67000)
#define GPIO_BANK2_REG_DIR_ADDR (DAVINCI_GPIO_BASE + 0x38)
#define GPIO_BANK2_REG_OPDATA_ADDR (DAVINCI_GPIO_BASE + 0x3c)
#define GPIO_BANK2_REG_SET_ADDR (DAVINCI_GPIO_BASE + 0x40)
#define GPIO_BANK2_REG_CLR_ADDR (DAVINCI_GPIO_BASE + 0x44)
davinci_syscfg_regs->pinmux[5] &= 0xF0FFFFFF;
davinci_syscfg_regs->pinmux[5] |= 0x08000000; // Enabling GP2_9 from the pinmux5_24
/* Making the direction output, followed by setting value high
Try 1:
REG(GPIO_BANK2_REG_DIR_ADDR) &= ~(0x01 << (0+9));
REG(GPIO_BANK2_REG_SET_ADDR) |= (0x01 << (0+9));
Try 2:
REG(GPIO_BANK2_REG_DIR_ADDR) &= ~(0x01 << (0+9));
REG(GPIO_BANK2_REG_CLR_ADDR) |= (0x01 << (0+9));
REG(GPIO_BANK2_REG_SET_ADDR) |= (0x01 << (0+9));
Try 3:
REG(GPIO_BANK2_REG_DIR_ADDR) &= ~(0x01 << (0+9));
udelay(10000);
REG(GPIO_BANK2_REG_SET_ADDR) |= (0x01 << (0+9));
udelay(100);
Thanks,
MUTHUKUMAR V