cancel
Showing results for 
Search instead for 
Did you mean: 

STM32驱动EC11编�?器

YLi.13
Associate II

使用STM32F446RE的Tim encode模�?接�?�EC11编�?器数�?��?�以区分正�??转�?�?如何使用LL库实现?

1 ACCEPTED SOLUTION

Accepted Solutions
KDJEM.1
ST Employee

Hello @YLi.13​ and welcome to the Community �� ,

Thanks to develop your posts in English so it helps us, and the users of our community understand your question and try to help you.

I've translated your question using a translation tool to increase the chances of getting you a reply from our experts and community members, since the majority interact in English.  

 Here is the translation of your post using Google translate:

STM32 drives EC11 encoder

Using the Tim encode mode of STM32F446RE to accept EC11 encoder data can distinguish between forward and reverse? How can this be achieved using the LL library?

You can configured the TIM1 in encoder mode interface, counting on TI1 and TI2.

The counting direction corresponds to the rotation direction of the connected

sensor. So you can distinguish between forward and Backward.

The LL TIM_Encoder example is not available in STM32CubeF4 package with STM32F446 MCU, but you can get inspired from HAL TIM_Encoder example.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Thank you

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

6 REPLIES 6
KDJEM.1
ST Employee

Hello @YLi.13​ and welcome to the Community �� ,

Thanks to develop your posts in English so it helps us, and the users of our community understand your question and try to help you.

I've translated your question using a translation tool to increase the chances of getting you a reply from our experts and community members, since the majority interact in English.  

 Here is the translation of your post using Google translate:

STM32 drives EC11 encoder

Using the Tim encode mode of STM32F446RE to accept EC11 encoder data can distinguish between forward and reverse? How can this be achieved using the LL library?

You can configured the TIM1 in encoder mode interface, counting on TI1 and TI2.

The counting direction corresponds to the rotation direction of the connected

sensor. So you can distinguish between forward and Backward.

The LL TIM_Encoder example is not available in STM32CubeF4 package with STM32F446 MCU, but you can get inspired from HAL TIM_Encoder example.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Thank you

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

YLi.13
Associate II

It seems that CubeIDE can use the LL library to generate TIMers in Encode mode?

YLi.13
Associate II

Thank you for your answer

Hi @YLi.13​ ,

Yes, you can use the STM32cubeIDE to generate Tim_Encoder project with the LL library.

After configuring your project with STM32cubeIDE, you can click at project manager/advanced settings and choose to use LL drivers in driver selector as shown in the below figure.
_legacyfs_online_stmicro_images_0693W00000bhfSoQAI.pngDoes it answer your question?

If your question is answered, please mark this thread as answered by selecting Select as best, as also explained here. This will help other users find that answer faster.

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

YLi.13
Associate II

And I found in the STM32F4 series LL library manual that it can drive the Encode mode of TIMer, so may I know how to understand "The LL TIM_Encoder example is not available in STM32CubeF4 package with STM32F446 MCU, but you can get inspired from HAL TIM_Encoder example."?

YLi.13
Associate II

So I use the function LL_ TIM_ The Counter value obtained by GetCounter will not only increase but also decrease based on the output of encoder channel A and channel B, right?