SLAU847D October 2022 – May 2024 MSPM0L1105 , MSPM0L1106 , MSPM0L1227 , MSPM0L1228 , MSPM0L1228-Q1 , MSPM0L1303 , MSPM0L1304 , MSPM0L1304-Q1 , MSPM0L1305 , MSPM0L1305-Q1 , MSPM0L1306 , MSPM0L1306-Q1 , MSPM0L1343 , MSPM0L1344 , MSPM0L1345 , MSPM0L1346 , MSPM0L2227 , MSPM0L2228 , MSPM0L2228-Q1
In TIMGx instances with QEI support, three digital Hall signals can be input into CCP channel 0 (CCP0), CCP channel input 1 (CCP1), and IDX for position control of 3-phase Hall-sensored motor applications. Hall signals are used to detect real-time motor position in motor control applications and can be used for speed computation measurements, position control, or motor stall status.
Table 23-14 shows the signal mapping for Hall signals A (U), B (V), and C (W) to TIMG capture/compare input signals.
Hall input signal | TIMx input |
---|---|
HALL A / HALL U | CCP0 |
HALL B / HALL V | CCP1 |
HALL C / HALL W | IDX |
As shown in Figure 23-21, the input capture module provides a 3-input XOR of synced CCP0, CCP1, and IDX signals to create a frequency generator (FG) signal. The XOR output signal is selected when IFCTL_xy[0/1].ISEL is set to 4h. See Figure 23-21 for XOR option in the input capture block diagram.
The XOR'ed output signal is propagated to the CC block and a period or pulse-width capture can be used to compute the linear motor speed in relation to the calculated period or pulse width in the TIMx.CC register. See Section 23.2.3.1.2.2 and Section 23.2.3.1.2.3 on how to calculate period and pulse-width captures based on the XOR'ed input signal.
Figure 23-22 shows the input signal to the CC block which can be used for speed calculations.
Hall Input Mode Configuration