AnsweredAssumed Answered

reading pwm inputs

Question asked by m.srinath on Nov 11, 2011
Latest reply on Nov 11, 2011 by m.srinath
Hi everyone

I have some silly newbie doubts on stm32f2 series
I had downloaded the standard peripheral library and was looking at the sample codes in 

My doubt is in the lines
GPIO_InitStructure.GPIO_Mode  = GPIO_Mode_AF;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
  GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
  GPIO_InitStructure.GPIO_PuPd  = GPIO_PuPd_UP ;

When we want to read a pwm signal, why are we setting the pin as an output?