How to use TIM2 ETR and TIM2 CH1 at the same time?
On F4 (and also other families) The TIM2_ETR and TIM2_CH1 are both on the same pins.
The pins are PA0, PA5 and PA15.
How can I configure the timer/gpio to get ETR on PA5 and CH1 on PA15 ?
The alternate function numbers are the same for ETR and CH1...
I need ETR and the unique features of CH1 and CH2.
An ST example uses this code to initialize the ETR GPIO PA0:
GPIO_InitStruct.Pin = GPIO_PIN_0;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
GPIO_InitStruct.Alternate = GPIO_AF1_TIM2;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);How does this code specify that this is for ETR and not CH1?
