cancel
Showing results for 
Search instead for 
Did you mean: 

Encoder Interface

rpo
Associate II
Posted on September 08, 2008 at 06:00

Encoder Interface

4 REPLIES 4
rpo
Associate II
Posted on May 17, 2011 at 12:43

Hi,

The firmware library uses the TIM_EncoderInterfaceConfig() function for configuring the Encoder interface. How can you specify which pins to capture? The config function only passes the timer itself (e.g. TIM4) but it does not specify which pins to use. The only way I could guess to do this is to map two pins from gpio to TIM4, then assume that those pins would be used. Is that right? If so, then doesn't that prevent us from using the other pins on the TIMx for other purposes such as pwm? Any help would be appreciated.

jaroslaw2
Associate II
Posted on May 17, 2011 at 12:43

Hi,

The Channel 1 and 2 of TIMx is used in this mode. If you initialize GPIO for alternative function with Channel 1 and 2 this will work.

I do not know If you can initialize other channels for different functions?

rpo
Associate II
Posted on May 17, 2011 at 12:43

Hi,

Thanks for the info. Is that documented anywhere? The only thing I could find is TIMx TIy with respect to the encoder interface. Does TIy refer to the channel? If so, why not CHy? What do the initials ''TI'' refer to?

jaroslaw2
Associate II
Posted on May 17, 2011 at 12:43

Check the picture form page 267 of ref. manual.