Motor Start-up

The motor’s initial speed from a Stop condition is zero. This makes the application of sinusoidal current drive difficult since there is no reference speed available. In this application, a low-speed trapezoidal drive is used as the starting commutation until the motor stabilizes for the sinusoidal drive. The trapezoidal drive is executed by configuring the CWG peripherals to Steering mode. Each time a Hall transition is detected, the PWM signal is steered to the output pin based on the 6-step drive table stored in program Flash, as shown in Figure 6-2. Each drive table array contains six elements based on the six states of Hall sensor logic. As the motor starts to turn, the PWM duty cycle is increased gradually until it establishes speed and completes a mechanical revolution.
Figure 1. Trapeziodal Look-Up Table

By the time it completes a mechanical revolution, the CWG peripherals are changed to Half-Bridge mode for the preparation of transition to sinusoidal drive. The timers used on angular transition are all reloaded and the functions on IOC ISR are changed with respect to sinusoidal function.