Question
GPIO 5V in AF
Posted on November 19, 2015 at 19:03
Hi,
I wanted to know how could I have 5V in a pin associated with a timer. I do this configuration:/*GPIOA Configuration: TIM9 CH1 (PA2)*/
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStructure.GPIO_OType = GPIO_OType_OD;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOA, &GPIO_InitStructure);
If I try this pulling up with a resistor to 5V, I only get 3,3-3,5V in PA2. If I do the same but in Output Mode i get the 5V. So, how could I get 5V if the pin is in AF?