i want to blink led

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

i want to blink led

2,181 Views
srinivas_123
Contributor III

i am using imx8mplus custom board and build the yocto BSP 6.63 version
. i want to blink the led using gpio pins.

my leds are connected to GPIO3_19 ,GPIO3_20 ,GPIO3_21 ,GPIO3_25.
by default this pins are ouput direction .
i added the python3-gpiod package in local.conf.
i wriiten python program using gpiod to blink the leds . my program is running without errors  but leds are not blinking.if anyone know how to blink leds please help me out.gpiochip3.png

Tags (1)
0 Kudos
Reply
4 Replies

2,155 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @srinivas_123 

I hope you are doing very well!

It appears you did not modified your device tree, you can add the following to your device tree:

&gpio3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_gpio3>;
	
	status = "okay";
};


Then, inside of the &iomuxc:

pinctrl_gpio3: gpio3grp {
		fsl,pins = <
                        MX8MP_IOMUXC_SAI5_RXFS__GPIO3_IO19      0x40000
		                MX8MP_IOMUXC_SAI5_RXC__GPIO3_IO20	    0x40000
                        MX8MP_IOMUXC_SAI5_RXD0__GPIO3_IO21	    0x40000
                        MX8MP_IOMUXC_SAI5_MCLK__GPIO3_IO25	    0x40000
		>;
	};

 

Then, you will be able to change the state of the pines with your code

 

Best regards,

Salas.

 

0 Kudos
Reply

1,173 Views
srinivas_123
Contributor III
Hi@Alejandro_Salas
MX8MP_IOMUXC_SAI5_RXFS__GPIO3_IO19 0x40000
The above is working fine for led blinking of gpio3 pin 19
could you please explain this what is 0x40000 and which register it configures.
0 Kudos
Reply

1,144 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @srinivas_123 ,

 

Sure, the register configured is SW_PAD_CTL_PAD_SAI5_RXFS SW PAD Control Register
(IOMUXC_SW_PAD_CTL_PAD_SAI5_RXFS):

image.png

You can find more information in reference manual.

 

Best regards,

Salas.

0 Kudos
Reply

1,162 Views
matato
Contributor I
0 Kudos
Reply