Skip to main content
allard
Senior
February 1, 2021
Question

Toggling PA10

  • February 1, 2021
  • 5 replies
  • 1390 views

I'm trying to use PA10 to drive a simple LED (custom board), but the I/O doesn't switch at all.

PA10 is not used in any of the device trees.

gpioinfo gpiochip0

reports the I/O as "unused" and "output", but switching the I/O with

gpioset gpiochip0 10=1

doesn't work. The voltage on the pin stays at 1.7V.

PA10 can also function as OTG_FS_ID or OTG_HS_ID, so maybe this causes problems? I do not use USB in my kernel device tree.

This topic has been closed for replies.

5 replies

PatrickF
ST Employee
February 1, 2021

Please check uBoot DT regarding PA10, which might still be activated as OTG_ID pin.

See https://wiki.st.com/stm32mpu/wiki/How_to_configure_U-Boot_for_your_board#USB_OTG_node

Regards.

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
allard
allardAuthor
Senior
February 1, 2021

My u-boot devicetree contains:

&usbotg_hs{
	u-boot,dm-pre-reloc;
 
	/* USER CODE BEGIN usbotg_hs */
	u-boot,force-b-session-valid;
	hnp-srp-disable;
	dr_mode = "peripheral";
	/* USER CODE END usbotg_hs */
};

So, the ID pin should be unused in uBoot?

PatrickF
ST Employee
February 1, 2021

Are you using the latest Openstlinux-5.4-dunfell-mp1-20-11-12 ?

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
allard
allardAuthor
Senior
February 1, 2021

I'm at 20-06-24 with DISTRO_VERSION 3.1-snapshot-20210201

OlivierK
ST Technical Moderator
February 8, 2021

​Hi allard (Community Member),

VDD3V3_USBFS is used to supply OTG_VBUS and OTG_ID (PA10) pins. So,

VDD3V3_USBFS must be supplied as well when USB high-speed dual-role-port or USB

high-speed device is used. If not used, should be connected to VDD.

This is an extract of the App note

https://www.st.com/resource/en/application_note/dm00389996-getting-started-with-stm32mp151-stm32mp153-and-stm32mp157-line-hardware-development-stmicroelectronics.pdf

Regards,

Olivier

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.