2014-07-24 05:53 PM
What is the use of the GPIOx_MODER Alternate function mode? Is it needed when an appropriate non-zero value is put into GPIOx_AFRL/H? Is the GPIOx_MODER alternate function mode value only needed for those few alternates using GPIOx_AFRL/H AF=0?
Does the alternate function take over the entire GPIO port bit. Or are GPIOx_OSPEEDR and GPIOx_PUPDR settings used as specified by the values stored in these registers?(I have never had the occasion to use any AF=0 alternate functions. When setting a non-zero alternate function have a tendency to set alternate function mode in GPIOx_MODER. My guess is that I am doing something unnecessary.) #gpio-alternate-function2014-07-25 03:01 AM
You set _MODER to AF for any of the alternate function, both zero and nonzero _AFRL/H.
> Does the alternate function take over the entire GPIO port bit. No. The mapped peripheral determines the direction (IN/OUT), but you still have speed, pullup/down and open-collector/push-pull under ''manual'' control through the respective registers. JW