Skip to main content
rpo
Associate II
September 8, 2008
Question

Encoder Interface

  • September 8, 2008
  • 4 replies
  • 1730 views
Posted on September 08, 2008 at 06:00

Encoder Interface

    This topic has been closed for replies.

    4 replies

    jaroslaw2
    Associate III
    May 17, 2011
    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
    rpoAuthor
    Associate II
    May 17, 2011
    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 III
    May 17, 2011
    Posted on May 17, 2011 at 12:43

    Check the picture form page 267 of ref. manual.

    rpo
    rpoAuthor
    Associate II
    May 17, 2011
    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?