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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

3,017 次查看
謝端桂
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

标签 (1)
0 项奖励
回复
1 回复

2,757 次查看
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 项奖励
回复