STM32HWEncoder on high RPM and high-speed H755

I’m planning on using STM32HWEncoder on high RPM (5000 rpm) motor and high-speed H755 MCU, with an optical sensor with 1024 ppr US Digital E16 with 4096 cpr ABI (341 kHz).

My questions are:

  1. Would the STM32HWEncoder support the H755?
  2. If it does, which pins?
  3. Is this MCU (550MHz core) fast enough to get the motor to 5000 rpm? My motor has 4 pole pairs. I assume the #3 is yes if 1 and 2 are yes however there may be someone who has already tried this?

@runger and @Antun_Skuric , you should probably have some feedback on this? Highly appreciated!

Cheers!
Valentine

Hey Valentine,

The HWEncoder class should work on H755…

For the pins, you need CH1 and CH2 for A and B signals, of any general purpose timer. You can check it in STM32CubeIDE, putting the timer in “Combined - Encoder Mode” and then seeing which pins you can use for CH1 and CH2.

For the Z pin you need the timer’s ETR pin. We don’t support it yet in the driver but I will add it soon.

I think 5000RPM should be doable with this MCU, especially with just 4PP

1 Like