AnsweredAssumed Answered

How to define bidirectional GPIO pins in STM32?

Question asked by dan on Jul 9, 2015
Latest reply on Jul 15, 2015 by dan
Dear all,

I am using a high density STM32F103 MCU where I need to define GPIOC0-GPIOC7 as bidirectional since data on all these pins will either be sent or received to/from another chip. I have designed these pins as:

  GPIO_InitStruct.GPIO_Pin = GPIO_Pin_0
                           | GPIO_Pin_1
                           | GPIO_Pin_2
                           | GPIO_Pin_3
                           | GPIO_Pin_4
                           | GPIO_Pin_5
                           | GPIO_Pin_6
                           | GPIO_Pin_7;
  GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF_PP;
  GPIO_Init(GPIOC, &GPIO_InitStruct);

but I am not sure if I have defined in a correct way, sine my code doesn't work as it should. So would you please let me know if I have (at least) defined the pins correctly, according to their functionality so I would make sure that the problem is not here?