Skip to main content
MSkar
Associate
Sep 24, 2019 7:07 AM UTC
Solved

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

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.
waclawek.jan
waclawek.janBest answer
Super User
Sep 24, 2019 10:41 AM UTC

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

2 replies

waclawek.jan
waclawek.janBest answer
Super User
Sep 24, 2019 10:41 AM UTC

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
Sep 26, 2019 7:30 AM UTC

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