cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F446RCT6 Timer1 counter mode regs

utpal kumar
Associate II
Posted on April 19, 2017 at 07:11

Dear All,

This is regarding the Timer 1 counter mode issue that we are facing with STM32F446RC microcontroller. We are trying to use F446 Timer 1 to count the external clock pulse by configuring timer 1 slave mode to External Clock Mode 1 with pulse input in TI1FP1 pin.

Here is the Configuration:

TIM1.SMCR = 0x57

TIM1.CCMR1 = 0x01

TIM1.CCER = 0x0B

TIM1.ARR =0x1388

TIM1.CR1 = 0x01

But the timer is start counting with internal clock when the input pulse is high and stop counting when the input is low. it's working similar to the gated mode configuration. But the expected behaviour is the timer should count the external pulse as it's configured to External Clock mode 1 and it's not working in F446 uC.

Here is the screen capture of TIMER 1 Register configuration debug window.

Same configuration is working fine with STM32F030 uC.

So please check and let us know, if there is any issue in our timer configuration.

Thanks,

Utpal

3 REPLIES 3
Posted on April 19, 2017 at 12:38

Register content looks good. Can you try with a different timer?

JW

Posted on April 20, 2017 at 08:19

Hi,

Thanks for your reply.

Can you please elaborate ?

Thanks,

Utpal

Posted on April 20, 2017 at 09:08

Try to use a different timer of the same mcu, with input on a different  pin.

Are you sure the counting comes from internal clock source? Is the input signal stable in both its positive and negative portion? What happens if you set the input stage to react only on one edge instead of both?

JW