GD32W51x User Manual
467
Figure 17-22. Hall sensor is used to BLDC motor
show how to connect. And we can see
we need two timers. First TIMER_in
(
Advanced/General L0 TIMER
)
should accept three
Rotor Position signals from Motor.
Each of the 3 sensors provides a pulse that applied to an input capture pin, can then be
analyzed and both speed and position can be deduced.
By the internal connection such as TRGO-ITIx, TIMER_in and TIMER_out can be connected.
TIMER_out will generate PWM signal to control BLDC motor
’
s speed based on the ITRx.
Then, the feedback circuit is finished, also you change configuration to fit your request.
About the TIMER_in, it need have input XOR function, so you can choose from
Advanced/General L0 TIMER.
And TIMER_out need have functions of complementary and Dead-time, so only advanced
timer can be chosen. Else, based on the timers
’
internal connection relationship, pair
’
s timers
can be selected. For example:
TIMER_in (TIMER1) -> TIMER_out (TIMER0 ITI1)
After getting appropriate timers combination, and wire connection, we need to configure
timers. Some key settings include:
Enable XOR by setting TI0S, then, each of input signal change will make the CI0 toggle.
CH0VAL will record the value of counter at that moment.
Enable ITIx connected to commutation function directly by setting CCUC and CCSE.
Configuration PWM parameter based on your request.
Figure 17-22. Hall sensor is used to BLDC motor
TIMER_in
Input capture
GPIO
TIMER_out
Output compare
PWM output
MCU
Core
Hall Sensor Rotor
Position signals
Driver Motor
MCU
BLDC
Motor