How to set gpio2_7 as input or output gpio pin on imx 51 evk with wince 6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set gpio2_7 as input or output gpio pin on imx 51 evk with wince 6

1,055 Views
謝端桂
Contributor I

Dear all:

I try to set gpio2_7 as gpio output pin, but failed. My source is list as below:

DDKIomuxSetPinMux(DDK_IOMUX_PIN_EIM_D23,

                      DDK_IOMUX_PIN_MUXMODE_ALT1,

                      DDK_IOMUX_PIN_SION_REGULAR);

  DDKIomuxSetPadConfig(DDK_IOMUX_PAD_EIM_D23,

                         DDK_IOMUX_PAD_SLEW_FAST,

                         DDK_IOMUX_PAD_DRIVE_HIGH,

                         DDK_IOMUX_PAD_OPENDRAIN_NULL,

                         DDK_IOMUX_PAD_PULL_NONE,

                         DDK_IOMUX_PAD_HYSTERESIS_NULL,

                         DDK_IOMUX_PAD_INMODE_NULL,

                         DDK_IOMUX_PAD_OUTVOLT_NULL);

  BOOL output = TRUE;

  if(!DDKGpioSetConfig(DDK_GPIO_PORT2, 7, DDK_GPIO_DIR_OUT, DDK_GPIO_INTR_NONE))

  {

       TEXTDEBUGMSG((TEXT("Config gpio failed\r\n")));

  }

  while(!g_TerminateThread)

  {

       DDKGpioWriteDataPin(DDK_GPIO_PORT2, 7, output);

       output = ~output;

       Sleep(5000);

  }

Thanks for your help,

Victor

Labels (1)
0 Kudos
1 Reply

797 Views
igorpadykov
NXP Employee
NXP Employee

Hi Victor

please check if all packages described in attached Release Notes

sect.2 System Requirements are installed on computer.

Try fresh build using sect.4.2.2 Clean Build for the BSP attached User Guide.

Also one can attach jtag and check gpio iomux settings.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos