
GD32F403xx User Manual
273
Hall sensor function
Hall sensor is generally used to control BLDC Motor; advanced timer can support this function.
Figure 16-20. 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 (TIMER0) -> TIMER_out (TIMER7 ITI0)
TIMER_in (TIMER1) -> TIMER_out (TIMER0 ITI1)
And so on.
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.
Содержание GD32F403 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F403xx Arm Cortex M4 32 bit MCU User Manual Revision 2 6 Jul 2022 ...
Страница 177: ...GD32F403xx UserManual 177 Peripheral Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 SDIO SDIO ...
Страница 217: ...GD32F403xx UserManual 217 ensures that no conversion is in progress ...