STM32F4: GPIOx_AFRL/H value vs. GPIOx_MODER AF mode
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2014-07-24 5:53 PM
Posted on July 25, 2014 at 02:53
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-function
Labels:
- Labels:
-
GPIO-EXTI
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2014-07-25 3:01 AM
Posted on July 25, 2014 at 12:01
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