Skip to main content
KKIM.6
Senior
October 8, 2022
Solved

How can I know the GPIO_Typedef of a Pin?

  • October 8, 2022
  • 2 replies
  • 2221 views

I connected a LED to the PA11 pin of STM32WB55VGY microcontroller

and I want to toggle it.

So, I'm trying to use HAL_GPIO_TogglePin(xx, yy) but I cannot know the "xx (GPIO_Typedef)" of PA11 pin.

Where can I found which pin is which GPIOx?

This topic has been closed for replies.
Best answer by Pavel A.

> I cannot know the "xx (GPIO_Typedef)" of PA11 pin

It is GPIOA :)

GPIO_Typedef of pin PB11 is GPIOB. ...

2 replies

Tesla DeLorean
Guru
October 8, 2022

The pin associativity would be in the Data Sheet.

HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_11);.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Pavel A.
Pavel A.Best answer
Super User
October 8, 2022

> I cannot know the "xx (GPIO_Typedef)" of PA11 pin

It is GPIOA :)

GPIO_Typedef of pin PB11 is GPIOB. ...