Skip to main content
SLori.1
Associate
September 24, 2021
Question

Using timer 3 to read hall sensors

  • September 24, 2021
  • 23 replies
  • 5100 views

I’m trying to use the timer3 ch1 ch2 ch3 of stm32g4 to read the hall sensors of motor but selecting this config under workbench 5.y. the motor doesn’t work. The default hall sensors timer is timer2. Any idea?

This topic has been closed for replies.

23 replies

SLori.1
SLori.1Author
Associate
October 4, 2021

Yes i see the three hall signals on the pins, seems correctly.

BR

SLori.1
SLori.1Author
Associate
October 4, 2021

In attached my hw, has been replicated the same schematic per three motor on the same board.

thanks

BR

cedric H
ST Technical Moderator
October 4, 2021

Hello,

Do you have a working setup with a genuine IHM16 and a Nucleo-G431 board ?

It would be a good starting point.

Now to answer your question, if when rotating a motor manually you see the speed moving, I would say that timer and interrupt linked to the timer are well configured.

Regards

Cedric

SLori.1
SLori.1Author
Associate
October 4, 2021

Yes, it work well but has TIm2 Pin,

Can you check if there is an hardware problem?

If the hall speed is read correctly why it is not use by firmware? the error is continously speed feedback when hall sensor are actived.

Thanks

BR

cedric H
ST Technical Moderator
October 4, 2021

It is very unlikely that your issue comes from the Timer3.

speed feedback error is generated by the Hall sensor if the pattern reads on the three pins is not legal.

It can occur if one of the three signal does not toggle, or if your placement angle is 60 instead of 120 or vice et versa.

Are you able with your working setup, to spin your motor with STO-PLL as primary sensor and HALL sensors as auxiliary sensor ?

Regards

Cedric

SLori.1
SLori.1Author
Associate
October 4, 2021

Yes it runs but with a bad start (first screen attached last week) , i have already tried to switch 120 and 60 degree without resolve the problem.

BR

cedric H
ST Technical Moderator
October 4, 2021

To be honest I do not really understand why you tried both 120 and 60 deg.

If you have a working setup with ST boards, you must apply the same Motor Hall sensors configuration (placement and electrical angle).

Those parameters are motor dependent, so must be identical from one board to another one.

So, If your placement angle is OK, with ST board, keep the same for your custom board.

Now, if you still have speed feedback error with a correct sensors placement, then the reading of the three Hall sensor pins is not correct.

This probably comes from your hardware, but checking custom hardware is out of the scope of this forum.

Regards

Cedric

SLori.1
SLori.1Author
Associate
November 16, 2021
Hi Cedric, what is the max power motor (current) that the X-NUCLEO-IHM16M1 can manage? Like nominal and in rush Current ecc? For which kind of motor is thought? Many thank Br Il giorno lunedì 4 ottobre 2021, ST Community ha scritto:
SLori.1
SLori.1Author
Associate
October 4, 2021

Yes, i have taken the same configuration that worked on eval and changes the pins using workbench 5.Y.2.

ok, how can i ask to ST support?

Thanks

BR

SLori.1
SLori.1Author
Associate
November 16, 2021

Hi Cedric, what is the max power motor (current) that the X-NUCLEO-IHM16M1 can manage? Like nominal and in rush Current ecc? For which kind of motor is thought? Many thank

Br

SLori.1
SLori.1Author
Associate
November 16, 2021

Hi Cedric, what is the max power motor (current) that the X-NUCLEO-IHM16M1 can manage? Like nominal and in rush Current ecc? For which kind of motor is thought? Many thank

Br