Skip to main content
SChen.19
Associate II
May 26, 2023
Question

How to use boot pin as gpio

  • May 26, 2023
  • 1 reply
  • 1238 views

Hi, I use boot1 pin as gpio key function. The boot1 is PI5, and I configure it in kernel dts code. When the system boot up, the input event0 device is shows, but I use hexdump can not get any key code data. Currently, my board is boot from sdcard.

	gpio-keys {
		compatible = "gpio-keys";
		#size-cells = <0>;
 
		user {
			label = "user";
			linux,code = <BTN_1>;
			gpios = <&gpioi 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
		};
	};

This topic has been closed for replies.

1 reply

Kevin HUBER
Technical Moderator
May 29, 2023

Hello @Community member​ ,

Are you on a custom board or a board provided by ST?

Best Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.NEW ! Sidekick STM32 AI agent, see here
SChen.19
SChen.19Author
Associate II
June 1, 2023

My custom board. I try to use boot mode pin as gpio to input/output.