cancel
Showing results for 
Search instead for 
Did you mean: 

Timer 3 counter clock source

A3
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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.

0690X00000AqPngQAF.png

> 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.

0690X00000AqPoAQAV.png

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

View solution in original post

4 REPLIES 4

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

A3
Associate III

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?

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.

0690X00000AqPngQAF.png

> 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.

0690X00000AqPoAQAV.png

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

A3
Associate III

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​ .