2024-07-25 09:59 AM - edited 2024-07-26 03: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.
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:
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
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.)
2024-07-26 02:32 AM - edited 2024-07-26 02: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 ?
2024-07-26 02:38 AM - edited 2024-07-26 02:46 AM
@MM..1 wrote:say one AF plus some analogs.
Doesn't selecting any analogue disable all AF ?
EDIT:
Yes, it does:
2024-07-26 02:44 AM
You see any more "+" here ? Then use it.
Otherwise you select other AF , maybe TIMx , then you have ONLY this AF.
2024-07-26 02:46 AM
I see , that MX dont do this. I ask is this possible by internal hw architecture ...
2024-07-26 02:51 AM
2024-07-26 02:54 AM - edited 2024-07-26 02:55 AM
@MM..1 wrote:I ask is this possible by internal hw architecture ...
No: See RM screenshots.
tl;dr: