This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

to make as a input pin in OMAPL138

Other Parts Discussed in Thread: OMAPL138

Hello,

I am work on OMAPL138 LCDK kit.

I want to make pin GP1[8] as a input for that I write the code

#define PINMUX3_GPIO1_8_ENABLE    (SYSCFG_PINMUX3_PINMUX3_3_0_GPIO1_8  << \
                                    SYSCFG_PINMUX3_PINMUX3_3_0_SHIFT)

PSCModuleControl(SOC_PSC_1_REGS, HW_PSC_GPIO, PSC_POWERDOMAIN_ALWAYS_ON,PSC_MDCTL_NEXT_ENABLE);

input_pin_gp1_8_multiplex_setup();

GPIODirModeSet(SOC_GPIO_0_REGS, 25, GPIO_DIR_INPUT);

GPIOPinRead(SOC_GPIO_0_REGS, 25);

static void input_pin_gp1_8_multiplex_setup(void)
{
unsigned int savePinmux = 0;
    /*
     ** Clearing the bit in context and retaining the other bit values
     ** in PINMUX3 register.
     */
     savePinmux = (HWREG(SOC_SYSCFG_0_REGS + SYSCFG0_PINMUX(3)) &
                  ~(SYSCFG_PINMUX3_PINMUX3_3_0));

     /* Setting the pins corresponding to GP1[8] in PINMUX3 register.*/
     HWREG(SOC_SYSCFG_0_REGS + SYSCFG0_PINMUX(3)) =
          (PINMUX3_GPIO1_8_ENABLE | savePinmux);
}

 I give the fixed HIGH signal (3.3V, checked with multimeter).

But when I read this signal, some times I get high value or some times low value.

Please give me the some solution for that.

regards

Sachin Arora