Problem with GPIO18

Discussion of your EDM baseboard, your add-on boards or other peripherals for your wandboard.

Problem with GPIO18

Postby raulina » Fri Aug 04, 2017 4:04 pm

Hi!

I've been following the instructions in http://wiki.wandboard.org/index.php/External_gpios to test GPIO18 ( EIM_DA8, gpio72 ) and GPIO19 ( gpio101 ). I can change the value for GPIO19 (101), but not for GPIO18 (72)... I am using kernel 4.9.35 with WB-Quad-revB1 and I tried it in two different boards just to ensure I didn't break it. I checked my device tree, and I think I didn't assign it to anything else:

Code: Select all
/dts-v1/;
#include "imx6q.dtsi"
#include "imx6qdl-wandboard-revb1.dtsi"

/ {
   model = "Wandboard i.MX6 Quad Board rev B1";
   compatible = "wand,imx6q-wandboard", "fsl,imx6q";

   memory {
      reg = <0x10000000 0x80000000>;
   };
};

&sata {
   status = "okay";
};

&ecspi1 {
    fsl,spi-num-chipselects = <1>;
   cs-gpios = <&gpio2 30 0>, <&gpio4 10 0>; /* EIM_EB2 */
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_ecspi1>;
   status = "okay";

        spidev@0 {
        compatible = "rohm,dh2228fv";
        spi-max-frequency = <10000000>;
        reg = <0>;
        };
};

&iomuxc {
   pinctrl-names = "default";

   imx6q-wandboard-revb1 {

      pinctrl_ecspi1: ecspi1grp-1 {
                  fsl,pins = <
                  MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1
                  MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1
                  MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1
                  MX6QDL_PAD_EIM_EB2__GPIO2_IO30  0x000f0b0
                  MX6QDL_PAD_KEY_COL2__GPIO4_IO10 0x000f0b0
                  >;
           };

   };
};


Can someone help me?

Thank you!
raulina
 
Posts: 15
Joined: Thu May 05, 2016 3:23 pm

Re: Problem with GPIO18

Postby raulina » Mon Aug 07, 2017 10:43 am

I tried without enabling the spi (with the default device tree) and still no changes in GPIO18... any hint/guess?
raulina
 
Posts: 15
Joined: Thu May 05, 2016 3:23 pm

Re: Problem with GPIO18

Postby Tapani » Fri Aug 11, 2017 9:52 am

With GPIOs the things you need to check are:
1. Pin muxing, did you really set the mux mode right?
2. Direction is correct?
3. Not blocked by any drivers? You can check this by trying to export the GPIO in sysfs ( echo 72 > /sys/class/gpio/export ) -- if you get a gpio72, it was not blocked
Tapani
Site Admin
 
Posts: 705
Joined: Tue Aug 27, 2013 8:32 am

Re: Problem with GPIO18

Postby raulina » Fri Sep 15, 2017 9:08 am

Tapani wrote:With GPIOs the things you need to check are:
1. Pin muxing, did you really set the mux mode right?
2. Direction is correct?
3. Not blocked by any drivers? You can check this by trying to export the GPIO in sysfs ( echo 72 > /sys/class/gpio/export ) -- if you get a gpio72, it was not blocked


I follow this procedure:

Code: Select all
echo XXX > /sys/class/gpio/export
echo out > /sys/class/gpio/gpioXXX/direction
echo 1 > /sys/class/gpio/gpioXXX/value
echo 0 > /sys/class/gpio/gpioXXX/value


For GPIO101 it works, but not for gpio72. The only difference from one case to the other is that the voltage changes in one of the pins but not in the other (I get no errors).
raulina
 
Posts: 15
Joined: Thu May 05, 2016 3:23 pm

Re: Problem with GPIO18

Postby imahendar » Wed Nov 22, 2017 1:01 pm

The WiringPi module for raspberry pi may solve this problem, if only by using a different method, your method may be the problem.

_______________
ebates login
imahendar
 
Posts: 4
Joined: Wed Jul 05, 2017 11:47 am


Return to Hardware and peripherals

Who is online

Users browsing this forum: No registered users and 16 guests

cron