cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4 BLDC HALL SENSOR

kulfi27
Associate II

Hi,

I am making a project using stm32cubeide for BLDC motor with Hall sensor.

First project generated using timer2 made for Hall sensor reading with Combined Channel XOR ON / Hall Sensor Mode option, motor is working correctly, interrupting reading Hall sensor position and setting correct commutation for the motor.

This option works fine.

While making next project using XOR activation (in CubeIDE) also reading Hall sensors interrupt, motor won't work correctly, it uses much more power, the work is not stable.

Why while using XOR activation the motor will not work when in fact it is made for reading Hall sensors?

Please give me some short explanation for the difference between those options?

1 ACCEPTED SOLUTION

Accepted Solutions
GMA
ST Employee

Hello,

Could you please check chapter 28.3.28 and 28.3.29 in the following document?

STM32G4 Series advanced Arm®-based 32-bit MCUs - Reference manual

Enabling "XOR ON / Hall Sensor Mode", enables "XOR activation" flag but also other settings (as the capture feature) described in "28.3.29 Interfacing with Hall sensors" chapter.

Best regards.

GMA

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA

View solution in original post

4 REPLIES 4
GMA
ST Employee

Hello,

Could you please check chapter 28.3.28 and 28.3.29 in the following document?

STM32G4 Series advanced Arm®-based 32-bit MCUs - Reference manual

Enabling "XOR ON / Hall Sensor Mode", enables "XOR activation" flag but also other settings (as the capture feature) described in "28.3.29 Interfacing with Hall sensors" chapter.

Best regards.

GMA

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA
_Danny_
Associate III

Hi, 

I am using stm32U5 for BLDC motor with Hall sensor.

May i know how did you read the hall sensor and commutate the motor using XOR/Hall Sensor mode. 

Can you please explain the whole process.

Hello @_Danny_ ,

The best advice I can give you is to read the User manual, section Hall sensor feedback processing.

cedricH_0-1704490582735.png

For the implementation detail, we cannot offer more than the commented implementation sources.

So, I advise you to generate a project for a supported series with hall sensors enabled, and dive into the code!.

Now if you have specific question, do not hesitate to ask on the forum, but please in a new thread dedicated to your question, not in this one which is already answer for 1,5 years.

Best Regards

Cedric

Hi cedric H,
Thank you for your assistance.