2016-11-01 09:28 AM
Dear all experts,
I am programming Incremental Encoder Reading project for 2 encoders.I intend to use TIM2, and TIM3 for Encoder Config with 4X Reading. I check the datasheet (DM00105814) for MCU Pin configuration.For TIM3, I can see TIM3-CH1, and TIM3_CH2 are Pin PA6, PA7For TIM2, I cannot find TIM2-CH1, instead of that, I see 2 pin PA0 and PA5 can config to same function TIM2-CH1-ETR.As subject, Could any one can help me to find out TIM2-CH1?Thank you in advance.2016-11-01 09:39 AM
TIM2-CH1-ETR is TIM2-CH1 and TIM2-ETR, as ETR is an input only it doesn't conflict, and would need to be configured inside the timer to be used.
2016-11-01 10:08 AM
Thank you very much Clive1,
I solved the problem by :/* (3) Select AF2 on PA5 in AFRL for TIM2_CH1 */
GPIOA
->
AFR
[
0
] |=
0x02
<< (
5
*
4
);
/* (3) */