Question
How to define bidirectional GPIO pins in STM32?
Posted on July 09, 2015 at 11:57
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? Regards, D.