cancel
Showing results for 
Search instead for 
Did you mean: 

Timers for Hall Sensor

sag
Associate III

Hi as i want to use hall sensor interface to my input pwm capture

 

We can see these timers associated with digital hall,

Which one i can choose TIM1/8/20 or TIM2/3/4/5 also suggest on 16 bit and 32 bit timer preference.

sag_2-1715840414781.png

 

 

sag_0-1715840364885.png

 

Also can it be preferable to use advance timer for hall

 

sag_3-1715840537837.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @sag

HRTIM main advantage is its high resolution, but it includes also a plenty of features. It is mainly used for Digital power application requiring a high resolution to regulate the PWMs very accurately and avoid transient perturbation when line or load change abruptly.

You can indeed use it for your application, considering 3 Timer Units (from Hrtim) and complementary behavior for the 2 outputs of each Timer unit.

Complementary behavior is enabled in CubeMx when deadtime option is selected, so you can configure SET/RESET for one PWM, and the other output in the same Timer Unit will follow with opposite polarity (and configured deadtime).

Please don't hesitate to request for additional information regarding the Hrtim configuration.

 

Best regards.

 

View solution in original post

7 REPLIES 7
Sarra.S
ST Employee

Hello @sag

The choice between an advanced or general-purpose timer is directly based on the specific requirements of your application because both (TIM1, TIM8, TIM20) and (TIM2, TIM3, TIM4, TIM5) are capable of interfacing with digital hall effect sensors

So, if your application requires high resolution or a wide counting range for example, a 32-bit timer like TIM2 or TIM5 would be preferable because of its larger count capacity

If you need more features such as complementary outputs with dead time generation and break inputs, you should be using advanced timers (TIM1, TIM8, TIM20).

 

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

sag
Associate III

Thanks Sarra for your important suggestions surely will consider on it.

Also if i want to use PWM out for my motor driver inverter complement of each other.

Can i configure , HRTIM1_CHB1 for High & HRTIM1_CHB2 will be its complement Low.

For motor driver as i need total 6 pwm channels.

So in short HRTIM1_CHB1 for High & HRTIM1_CHB2 are complement of each other

Also rest of the timers like HRTIM1_CHA1, HRTIM1_CHA2,

sag_0-1715870140203.png

 

 

sag_1-1715870179326.png

 

As these i am considering for my motor driver 3 phase bridge

 

sag_2-1715870477350.png

 

Please advice

 

sag
Associate III

sag_0-1715870897487.png

Need pin details for the same which are opposite to the ref pwm

sag
Associate III

Can you please check on this PWM pins

sag
Associate III

hello

sag
Associate III

can you pass this question to anyone

Hello @sag

HRTIM main advantage is its high resolution, but it includes also a plenty of features. It is mainly used for Digital power application requiring a high resolution to regulate the PWMs very accurately and avoid transient perturbation when line or load change abruptly.

You can indeed use it for your application, considering 3 Timer Units (from Hrtim) and complementary behavior for the 2 outputs of each Timer unit.

Complementary behavior is enabled in CubeMx when deadtime option is selected, so you can configure SET/RESET for one PWM, and the other output in the same Timer Unit will follow with opposite polarity (and configured deadtime).

Please don't hesitate to request for additional information regarding the Hrtim configuration.

 

Best regards.