Skip to main content
Visitor II
May 16, 2024
Solved

Timers for Hall Sensor

  • May 16, 2024
  • 3 replies
  • 1883 views

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

 

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

    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.

     

    3 replies

    ST Employee
    May 16, 2024

    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).

     

     

    sagAuthor
    Visitor II
    May 16, 2024

    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

     

    sagAuthor
    Visitor II
    May 16, 2024

    sag_0-1715870897487.png

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

    sagAuthor
    Visitor II
    May 21, 2024

    hello

    ST_SophiaAnswer
    ST Employee
    June 7, 2024

    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.