Maximum number of quadrature encoders supported on STM32F777
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-02 2:58 PM
I would like to know the maximum number of quadrature encoders (looking for up to 8) that can be supported with a STM32F777ZITx. Any other STM MCU's that do better?
Can more be supported if using LL interfaces instead of HAL?
RE: HAL
I am referring to the encoder interface mentioned in Section 4.3.4 of this application note:
Cheers,
Kamal
- Labels:
-
STM32F7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-02 3:22 PM
The HW is the same regardless of the HAL or LL.
How many bits do you need, as I recall only TIM2 and TIM5 offer 32-bit encoder resolution.
There are perhaps 8 total TIM providing for 2 inputs.
You'd want to review the data sheet for your chosen part/pin count.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-02 3:30 PM
As Clive said above, 7 or 8 is the limitation given by hardware.
In one design, we've circumvented this limitation by using several cheap STM32F0xx, connected to the main mcu using I2C.
Also, depending on the input pulses speed, multiple slower encoders may be handled by software in a periodic interrupt.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-03 7:34 AM
HAL vs LL: The HAL interface only allows configuring input 1 and 2 for a timer in encoder mode but some timers have more than 2 channels (some have up to 6), which can all be configured as inputs or outputs, and so I thought I might be able to select another pair of channels as inputs for configuring another encoder if I had access to doing so through LL. Clearly, I need to learn a lot more about this stuff.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-03 7:39 AM
If I had access to 8, it might just work. I was trying to stay away from using multiple MCUs for this.
We are trying to get a reading for the position of a linear actuator being used as a pinch valve (we have 8 of them).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-03 7:59 AM
The hardware in timer allows to use encoder mode specifically only on CH1 and CH2.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-03 8:07 AM
As Jan points out encoder mode only works with CH1 and CH2, but more critically the TIM only has a single counting element which limits their utility.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-03 8:17 AM
Thanks folks. The limitation is crystal clear now.
