Skip to main content
kulfi27
Associate II
July 27, 2022
Solved

STM32G4 BLDC HALL SENSOR

  • July 27, 2022
  • 2 replies
  • 5691 views

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?

This topic has been closed for replies.
Best answer by GMA

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

2 replies

GMA
GMABest answer
Technical Moderator
August 12, 2022

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
Associate III
January 3, 2024

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.

cedric H
Technical Moderator
January 5, 2024

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

Associate III
January 8, 2024

Hi cedric H,
Thank you for your assistance.