Skip to main content
Tobe
Senior III
December 4, 2023
Question

Manual to configure hall/quadrature sensors in CubeMX

  • December 4, 2023
  • 3 replies
  • 4403 views

I am quite a bit dissapointed, that it is not enough to have the following things:

- datasheet

- reference manual

- application note 4013 "cross-series timer overview"

- cubeMX configuration tool

and not beeing able to use them together, to set up the hall or quadrature sensor feature.

Maybe there are more datasheets and/or software tools needed?

From the reference manual alone, i could probably do it, but then, what is the cubeMX software for anyway?

It should take only a few clicks and few seconds to set this up. Or is this only in a commercial version?

Or does the problem sit in front of the screen?

 

This topic has been closed for replies.

3 replies

cedric H
Technical Moderator
December 4, 2023

Hello @Tobe,

Could you describe what do you try to achieve?

What kind of motor do you want to drive? PMSM, ACIM, STEPPER ?

What kind of algorith do you want to use ? FOC, 6-STEPS ?

CubeMX allows you to initialize your peripherals according to the graphical configuration. It cannot create a full application. STM32 Timers have dedicated mode for doing Hall sensors measurement or making use of encoder - cubeMX allows you to configure the timers you want to use into the right mode. Once your timer is properly configured, you need the right software to take benefits from the hardware.

I do not know if you are aware of our MCSDK, but if you want to drive a PMSM motor with 6 steps or FOC algo, I encourage you to download it and give it a try.

Regards

Cedric

Tobe
TobeAuthor
Senior III
December 4, 2023

As the title says: "configure hall/quadrature sensors in CubeMX".

I just found the "combined channels" option, which was to far down to be noticed by me...

I tried the MCSDK, but at the moment its useless for me. I cant export generated code, nor can i easily add a custom board.

cedric H
Technical Moderator
December 5, 2023

Hello @Tobe,

If your point is to configure the timer to use Hall sensors, or encoder, then why don't you generate a project with the MCSDK and open the generated IOC with cubeMX ?

If your project selects Hall sensors or Encoder as primary or auxiliary speed sensors, then the IOC generated will contain the selected Timer properly configured. Up to you to duplicate this configuration into your own project.

Just out of curiosity, what do you mean by "I cant export generated code" ? and what is missing to allow you to add a custom board?

Best Regards

Cedric

 

TDK
Super User
December 4, 2023

Perhaps add some more details on what you're trying to do exactly. In particular, what hall sensor or quadrature part number are you working with?

"If you feel a post has answered your question, please click ""Accept as Solution""."
waclawek.jan
Super User
December 6, 2023

> From the reference manual alone, i could probably do it

Then you should consider doing it that way.

> but then, what is the cubeMX software for anyway?

For rapid clicking of a selection of applications. If it does not work for you, maybe you should not push it.

Timers (including quadrature sensor readout) are relatively simple. Motor control may be challenging, though. Your choice.

JW