cancel
Showing results for 
Search instead for 
Did you mean: 

I'm using the Nucleo-L152. I want to use the External clock on timer 2 and the counter does not increment. I use the same configuration on timer 3 and the counter increments as expected. Is there any issue with Timer2_ETR?

JMene.1
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions

Read out and check/post the relevant TIM and GPIO registers content.

JW

View solution in original post

2 REPLIES 2

Read out and check/post the relevant TIM and GPIO registers content.

JW

JMene.1
Associate II

Thanks for the tip. Yes I checked and the AFR was not configured correctly. I use the STM32CubeIDE to initialize the ports. When I use PD2 to connect to TIM3_ETR, everything is configured correctly. When I use PA0 to connect to TIM2_ETR, the AFR register is not configured.

Bug in STM32CubeIDE or I misuse it? Anyway, I found my bug.

regards