How do you control the GPIO pins on an STM32MP1?
Is micro python an option?
Is micro python an option?
Hello @msche.1 ,
As explained on the wiki you can displays information and controls the gpiochip line with "gpiodetect", "gpioinfo", "gpioget", etc: https://wiki.st.com/stm32mpu/wiki/How_to_control_a_GPIO_in_userspace
The mapping of the GPIO is available in the datasheet, from page 93:
https://www.st.com/resource/en/datasheet/stm32mp157c.pdf
If you want the information of pin PA8 for example, you can first do a:
root@stm32mp1:~# gpiodetect
gpiochip0 [GPIOA] (16 lines)
gpiochip1 [GPIOB] (16 lines)
gpiochip2 [GPIOC] (16 lines)
gpiochip3 [GPIOD] (16 lines)
gpiochip4 [GPIOE] (16 lines)
gpiochip5 [GPIOF] (16 lines)
gpiochip6 [GPIOG] (16 lines)
gpiochip7 [GPIOH] (16 lines)
gpiochip8 [GPIOI] (16 lines)
gpiochip9 [GPIOZ] (16 lines)You see that GPIOA is gpiochip0:
Then you can use:
root@stm32mp1:~# gpioget gpiochip0 8
0Same thing with gpioset.
Regards,
Kevin
In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.