Skip to main content
MSkar
Associate
September 24, 2019
Solved

Is it possible to read from multiple channels of same timer in input capture mode...?

  • September 24, 2019
  • 1 reply
  • 751 views

Hi ,

  My name is Midhun .I want to know is it possible to read from multiple channels of same timer in input capture mode...?

I am using Stm32f401RE Nucleo board ,Using MDK ver 5.0 on KEIL IDE.

Our project includes a multitude of optical encoder units which we used to find the position of dc motors associated with it .Is it is possible to access multiple encoder unit reading which are connected to different channels of a particular timer ,If yes how to read value by addressing the timer channel specifically using the HAL API functions..?

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

Yes you can use all the channels of one timer in input capture mode, you'll read the captured value from TIMx_CCRx registers. I don't use Cube, don't know the incantation for that, sorry.

You can't use the "encoder mode" (in the slave-mode controller) on other than CH1+CH2, though, if you'd intend to use that mode.

Read the TIM chapter in RM.

JW

1 reply

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

Yes you can use all the channels of one timer in input capture mode, you'll read the captured value from TIMx_CCRx registers. I don't use Cube, don't know the incantation for that, sorry.

You can't use the "encoder mode" (in the slave-mode controller) on other than CH1+CH2, though, if you'd intend to use that mode.

Read the TIM chapter in RM.

JW

MSkar
MSkarAuthor
Associate
September 26, 2019

Thank you very much for the information . It helped us solving my problem