Skip to main content
Tejashree
Associate III
November 22, 2021
Question

I am using advance timer 1 for pwm generation and hall sensor on timer 4.Internal trigger is not working in this case.

I am trying to use combined channel :XOR/HALL sensor on timer 4:

0693W00000GYNmKQAX.pngand trigger mode on timer 1 to trigger pwm:

0693W00000GYNisQAH.png0693W00000GYNnIQAX.pngI don't understand why my trigger is not working.I see a constant pwm on the line

This topic has been closed for replies.

4 replies

LCE
Principal III
November 22, 2021

The first picture gives the impression that timer 4 is not enabled.

You cannot trust CubeMX 100%, it's mostly a starting point, so always find a way to check the register settings (UART).

Tejashree
TejashreeAuthor
Associate III
November 22, 2021

I am using STM32G431CB, which has dedicated pins for hall sensor.So when ever i select XOR/HALL sensor setting.The channel assignment is done automatically and so i cannot change any settings.

TDK
November 22, 2021

I believe LCE is saying that "Clock source: Disable" indicates the timer isn't running. Probably this should be set to internal.

"If you feel a post has answered your question, please click ""Accept as Solution""."
cedric H
ST Technical Moderator
November 23, 2021

Hello @Tejashree​ ,

Could you describe your working flow ?

Are you using the MC-SDK or do you try to configure the peripherals yourself ?

For your information, the MC-SDK allows you to configure the hall sensor as speed sensor. Once the project is generated, an IOC file is available. You can open it with cubeMX and observe how did the MCSDK configure the timer.

Regards

Cedric