How activate one AF and more Analog func on same pin G431
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-25 9:59 AM - edited ‎2024-07-26 3:12 AM
Hi i plan new design and require activate for example on PA3 ADC1_IN4 and same time COMP2_INP.
Is this possible and if yes how sequence to setup HAL LL or direct?
EDIT: Renamed from more AF ... only one AF poss.
- Labels:
-
STM32G4 series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-25 10:13 AM - edited ‎2024-07-25 10:16 AM
@MM..1 wrote:Is this possible
I think not - you can only select one AF ?
EDIT:
The AFSEL takes one value to select one AF - it's not a bitmap:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-25 10:44 AM - edited ‎2024-07-25 10:46 AM
No
But check the internal plumbing / connectivity of COMP2_INP, might be some, will be fixed/limited.
Otherwise use two pins and wire.
Also does an ADC need an AF setting? It's kind of implied via "Analogue Input" mode for the pin and not the AF mapping
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-25 11:20 AM - edited ‎2024-07-25 11:33 AM
Hi,
just try to enable both in CubeMx , if possible you can do it ( = if both on analog mux).
see on F303, the green "+" , can use comp, adc, opamp on same pin:
(Probably same on your G431 .)
And gen.code, just look, how Cube is doing/setting...then you know, how to do.
If need set AF , say TIMx , only one AF can be set in register for AF-function on a pin.
So impossible to set the AF mux to two different values same time. (need 2 pins then, as Tesla said.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-26 2:32 AM - edited ‎2024-07-26 2:36 AM
Perfect G4 have this + too, but what if i need activate same time TIM2CH4 and ADC and COMP (based on 303 showed). Or better say one AF plus some analogs.
And from your image i mean MX miss EXTI here, because this is too combinable or ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-26 2:38 AM - edited ‎2024-07-26 2:46 AM
@MM..1 wrote:say one AF plus some analogs.
Doesn't selecting any analogue disable all AF ?
EDIT:
Yes, it does:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-26 2:44 AM
You see any more "+" here ? Then use it.
Otherwise you select other AF , maybe TIMx , then you have ONLY this AF.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-26 2:46 AM
I see , that MX dont do this. I ask is this possible by internal hw architecture ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-26 2:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-26 2:54 AM - edited ‎2024-07-26 2:55 AM
@MM..1 wrote:I ask is this possible by internal hw architecture ...
No: See RM screenshots.
tl;dr:
- Only a maximum of one AF for each pin;
- Selecting Analogue mode disables all AF.
