Skip to main content
rm2399
Associate II
August 12, 2014
Question

Error in the type definition of ''GPIO_InitTypeDef''

  • August 12, 2014
  • 1 reply
  • 797 views
Posted on August 12, 2014 at 20:55

In stm32f4xx_hal_gpio.h (

delete

comment

)

typedef struct

{

  uint32_t Pin;

  uint32_t Mode;

  uint32_t Pull;

  uint32_t Speed;

  uint32_t Alternate;

}GPIO_InitTypeDef;

But

to select the

alternate function

you need

64 bits

(

4 bits

for each

GPIO

). The register are GPIOx_AFRL and GPIOx_AFRH.

Or have I got

something wrong

?

I work with the

latest

version

STM32CubeMX

.

#gpio-init
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
August 12, 2014
Posted on August 12, 2014 at 21:58

Or have I got

something wrong

?

This is a configuration structure, not a peripheral register.
Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..