Skip to main content
Vin1947
Associate
September 28, 2019
Solved

STM32F103C8T6 TIM1 in ENCODER MODE GPIO Pins

  • September 28, 2019
  • 2 replies
  • 1382 views

Hi,

I am using stm32f103c8t6 connected to a rotary encoder using SPL. I was planning to use TIMER 1 in encoder mode, but probably I had made a mistake by connecting channel A of encoder to PB13 (T1C1N) and channel B to PB14(T1C2N) - this setup doesnt work at all.

So, is it possible that TIM1 can decode encoder signals in this configuration or the only solution is to re-route the encoder signals to PA8 & PA9 pins of the µC?

I also tried using STM32Cube just to cross check my assumption and there also it seems that I can't use PB13 & PB14 in encoder interface mode. I have checked the encoder signals with a scope and they look clean and sharp and the same encoder works well with TIM2 and TIM4.

Kindly help with suggestions and solutions

Regards

Vin

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

> So, is it possible...

No.

The complementary pins (i.e. TIMx_CHyN) are outputs only.

JW

2 replies

waclawek.jan
waclawek.janBest answer
Super User
September 28, 2019

> So, is it possible...

No.

The complementary pins (i.e. TIMx_CHyN) are outputs only.

JW

Vin1947
Vin1947Author
Associate
September 29, 2019

Thank you waclawek.jan ! I think I should start re-routing the tracks as well as my foolishness:grinning_face_with_sweat: