2019-10-15 11:24 PM
Is external clock mode 1 and external clock mode 2 are available only for channel 1 of general purpose timer(Timer 3 specifically)?. Or other channels can also be configured for it?
Solved! Go to Solution.
2019-10-16 01:51 AM
I am using STM32F779NI. Basically I need to count the pulses at PB4 pin(Timer 3 channel 2).
There is no TIM3_CH2 on PB4; there is TIM3_CH1 on PB4.
> Can you let me know the difference between ETR and Timer input?
ETR is a special input to the timer, which is not bound to any of the Capture-Compare channels, and has different functionality than the TIMx_CHx pins.
On the 'F77x, TIM3_ETR is available on PD2.
> For my requirement i.e counting pulses at PB4, ext clock mode 1 or ext clock mode 2 should be used or any of these can be used?
Mode 1.
> Again same question, is both the ext clock mode 1 and ext clock mode 2 available for all the channels or only channel 1?
And again the same answer:
External clock mode 1 works out of any of the Slave Mode Controller's input, look at TIMx_SMCR.TS (i.e. that includes CH1, CH2 and ETR).
External clock mode 2 works specifically out of ETR.
Read the Timer chapter in RM.
JW
2019-10-15 11:36 PM
You forgot to tell us which STM32 are you using.
External clock mode 1 works out of any of the Slave Mode Controller's input, look at TIMx_SMCR.TS (i.e. that includes CH1, CH2 and ETR).
External clock mode 2 works specifically out of ETR.
JW
2019-10-16 01:35 AM
hi @Community member .
Thanks for the quick reply.
I am using STM32F779NI. Basically I need to count the pulses at PB4 pin(Timer 3 channel 2).
Yes, ext clock mode 2 works on ETR and ext clock mode 1 works on Timer Input.
Can you let me know the difference between ETR and Timer input? (My understanding is Timer input is basically the Timer3 channel 2 i.e PB4 pin in my case.)
For my requirement i.e counting pulses at PB4, ext clock mode 1 or ext clock mode 2 should be used or any of these can be used?
Again same question, is both the ext clock mode 1 and ext clock mode 2 available for all the channels or only channel 1?
2019-10-16 01:51 AM
I am using STM32F779NI. Basically I need to count the pulses at PB4 pin(Timer 3 channel 2).
There is no TIM3_CH2 on PB4; there is TIM3_CH1 on PB4.
> Can you let me know the difference between ETR and Timer input?
ETR is a special input to the timer, which is not bound to any of the Capture-Compare channels, and has different functionality than the TIMx_CHx pins.
On the 'F77x, TIM3_ETR is available on PD2.
> For my requirement i.e counting pulses at PB4, ext clock mode 1 or ext clock mode 2 should be used or any of these can be used?
Mode 1.
> Again same question, is both the ext clock mode 1 and ext clock mode 2 available for all the channels or only channel 1?
And again the same answer:
External clock mode 1 works out of any of the Slave Mode Controller's input, look at TIMx_SMCR.TS (i.e. that includes CH1, CH2 and ETR).
External clock mode 2 works specifically out of ETR.
Read the Timer chapter in RM.
JW
2019-10-16 03:05 AM
Hi @Community member
Hey thanks for the input.
My mistake. I want to read it on PB5 i.e Timer 3 channel 2 and not on PB4.
So, now it is clear that on PB5 also,i.e Timer 3 channel 2, I can count the no. of pulses using External Clock Mode 1 configuration.
Thanks @Community member .