IM8MM: Need help for GPIO control

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

IM8MM: Need help for GPIO control

692 次查看
Suraj714
Contributor I

Hi Expert!

We are using IMX8-mini device.

We are dealing with GPIO pins control.

On IMX8mini has gpio's that gpio5-8 and gpio5-9 pins.

We are trying to control that pins using command input. When we do gpioset -c gpiochip5 8=0 then status was not changing for that. Observed on gpioinfo status was not changed.

Used commands:

 

破坏者

gpioset -c gpiochip5 8=0

gpioset -c gpiochip5 9=0

gpioset -c gpiochip5 9=1

gpioset -c gpiochip5 8=1

this above commands are used for gpio testing. also did activelow option using -l

When we observed on multimeter that value of  supply voltage not changing. Supply voltage not changing means state are not working properly right?
Is there any option is there for to control gpio ? or anything we missed in process to test control ?

When we used below command it was changed status.

gpioset -c gpiochip5 -l 8=0 

above command was terminated automatically we need to terminate is that right behavior?
Please share exact procedure for nxp chipset mini8mp gpio control test.



Thanks,

Suraj.








 

 

 

0 项奖励
回复
3 回复数

649 次查看
ddbug
Contributor II

Use --mode=wait with gpioset commands. Because, gpioset allocates the gpio line and drives it only until it exits. Then the line is deallocated an returns to its defalt state. 

0 项奖励
回复

609 次查看
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

I don't see any DTS attached, you have to change it because they are UART3 flow control.

Which are used in EVK as UART flow control signals mapped to J1003.

 

josephlinares_3-1699379866422.png

In dtsi, they are used as UART 3 pins.

 

pinctrl_uart3: uart3grp {
        fsl,pins = <
            MX8MM_IOMUXC_ECSPI1_SCLK_UART3_DCE_RX           0x140
            MX8MM_IOMUXC_ECSPI1_MOSI_UART3_DCE_TX           0x140
            MX8MM_IOMUXC_ECSPI1_SS0_UART3_DCE_RTS_B         0x140
            MX8MM_IOMUXC_ECSPI1_MISO_UART3_DCE_CTS_B        0x140
        >;
};

&uart3 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart3>;
    assigned-clocks = <&clk IMX8MM_CLK_UART3>;
    assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
    fsl,uart-has-rtscts;
    status = "okay";
};

 

If you made the changes properly, you should be able to set and clear the GPIO signals with these commands:

#command to turn off the led
root@imx8mnevk:~# echo 0 >> /sys/class/leds/yellow\:status/brightness
#command to turn on the led
root@imx8mnevk:~# echo 1 >> /sys/class/leds/yellow\:status/brightness

Regards,

0 项奖励
回复

670 次查看
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products,

Did you add the GPIOs to the device tree and recompiled again? Could you share your device tree?

Regards

0 项奖励
回复