2021-12-17 3:27 AM
Hello,
I am using STM32mp157f-dk2 board and I have a peripheral connected on GPIO pin #16 ( PF1)
on doing gpoiget gpiochip5 1 > i get 1
on doing gpiosetgpiochip5 1=0 i DO NOT get any error but on doing again gpioget gpiochip5 1 > i get 1 again
I see it is shared with SDMMC3_CMD . On directly connecting it to Ground , it becomes low , not otherwise from the above commands.
Is this the same MMC on which starter image is written?Is it safe to pull it down permanently from the hardware?
May I know how to make it low from the software permanenetly.
Regards,D
Solved! Go to Solution.
2022-02-10 9:04 PM
Thanks @PatrickF This worked actually by following example code on stm32mpu wiki using the libgpiod example code :
Regards,
2022-01-04 12:36 AM
Hi @darla14 ,
may I suggest to try using devmem2 to directly access GPIO registers.
e.g.
# enable GPIOF IP clock in RCC
devmem2 0x50000A28 W 0x00000020
# set PF1 in GPIO output mode
# read the value (I read 0xBFBFFFCF on my DK2)
devmem2 0x50007000 W
# write the value modified with MODER1=0b01
devmem2 0x50007000 W 0xBFBFFFC7
# set PF1 = 0 using bit BR1 in GPIOF_BSRR (but PF1 should be already 0 as default value)
devmem2 0x50007018 W 0x00020000Regards.
2022-01-04 12:45 AM
In fact, using "gpioget gpiochip5 1" will put PF1 in input mode (I assume you have an external pull-up as you read '1'), so should not be used after having issued "gpioset gpiochip5 1=0" which put PF1 in output with '0'.
Regards.
2022-02-10 9:04 PM
Thanks @PatrickF This worked actually by following example code on stm32mpu wiki using the libgpiod example code :
Regards,
2022-02-10 11:19 PM
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'
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.