Skip to content

[Encoder] Support multiple types of index #130

@luizvilla

Description

@luizvilla

Is your feature request related to a problem? Please describe.
When making an encoder work with the current code base in V1.0, I've noticed that there is no support for multiple types of indexig. This has lead to a situation where I had to go deep into the code to test different types until I got my encoder working correctly.

Describe the enhancement you'd like
I would like the indexing methods to be exposed on the spin API during setting up of timer 3 or timer 4.

Describe alternatives you've considered
I've gone all the way down into the timer HAL to tweak the indexing.

Additional context
Here's the different indexing types supported by the SPIN board (STM32G474RE)

LL_TIM_INDEX_POSITION_DOWN_DOWN                      /!< Index resets the counter when AB = 00/
LL_TIM_INDEX_POSITION_DOWN_UP                            /!< Index resets the counter when AB = 01/
LL_TIM_INDEX_POSITION_UP_DOWN                            /!< Index resets the counter when AB = 10/
LL_TIM_INDEX_POSITION_UP_UP                                   /!< Index resets the counter when AB = 11/
LL_TIM_INDEX_POSITION_DOWN                                    /!< Index resets the counter when clock is 0/
LL_TIM_INDEX_POSITION_UP                                          /!< Index resets the counter when clock is 1/

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions