AnsweredAssumed Answered

im6ul_evk board  GPIO can't output normally

Question asked by tony zhang on Nov 14, 2016
Latest reply on Nov 15, 2016 by tony zhang

I configure  ENET2_RX_ER pin to GPIO, and want to output a square wave.

1. I use pinTool to configure this pin :

            BOARD_InitPins: BOARD_InitPinsgrp {
            /*
           * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
            BOARD_InitPins:
           - options: {coreID: singlecore}
           - pin_list:
           - {pin_num: D16, peripheral: GPIO2, signal: 'gpio_io, 15', pin_signal: ENET2_RX_ER}
          * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
          */
           fsl,pins = <
                         MX6UL_PAD_ENET2_RX_ER__GPIO2_IO15 0x000010B0
                     >;
            };

copy these code to imx6ul_14x14_evk.dts. then build them,and create dtb file.

 

 

then write a simple linux driver.let this port output square wave :

       for (i=0; i<200;i++)
{
if (i%2)
{
gpio_direction_output(IMX_GPIO_NR(2, 15), 1);
}
else
{
gpio_direction_output(IMX_GPIO_NR(2, 15), 0);
}
msleep(2);
}

 

 

but see noting throught oscilloscope. I'm not sure if something is ignore ,while configure this port.

Outcomes