Skip to main content
JMene.1
Associate II
October 20, 2020
Solved

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?

  • October 20, 2020
  • 2 replies
  • 859 views

..

This topic has been closed for replies.
Best answer by waclawek.jan

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

JW

2 replies

waclawek.jan
waclawek.janBest answer
Super User
October 20, 2020

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

JW

JMene.1
JMene.1Author
Associate II
October 21, 2020

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