MSPM0G1518: How to configure two channels of the same timer for two TIMER-COMPARE timers?

Part Number: MSPM0G1518
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

I need to configure two TIMER-COMPARE timers for motor tach number measurement. I need to use channel 0 and 1 of TIMA1 to detect these two pulse signals. But I cannot select the same timer for two TIMER-COMPAREs in syscfg tool. It reports "resource conflict" error. Is this a limitation of TI syscfg tool? Is there any way that I can use to make it work? Thanks!

  • COMPARE (edge-counting) mode uses an external trigger to "tick" the counter, the so-called Advance Condition (ACOND) [Ref TRM (SLAU846C) Table 27-6]. The ACOND can be triggered from any channel, but only one source can be used. (I suppose that is the resource conflict; Sysconfig didn't let me get that far.)

    CAPTURE mode allows one trigger per channel, but you have to do the counting yourself. (Timer capture is usually better than edge-counting for a low-frequency signal.)

    QEI/Hall mode essentially distills multiple input signals into a single counting trigger [Ref TRM Sec 27.2.3.1.3]. This is only available in TIMG -- specifically TIMG8/9 in your device.

  • COMPARE (edge-counting) mode uses an external trigger to "tick" the counter, the so-called Advance Condition (ACOND) [Ref TRM (SLAU846C) Table 27-6]. The ACOND can be triggered from any channel, but only one source can be used. (I suppose that is the resource conflict; Sysconfig didn't let me get that far.)

    Yes, CCx input trigger timer's counter to advance, one timer has only one counter, so it is not possible to use single counter to count external two edges.

    CAPTURE mode allows one trigger per channel, but you have to do the counting yourself. (Timer capture is usually better than edge-counting for a low-frequency signal.)

    In the common implement, we use failing edge to reset counter to zero/load and start it, then capture the counter value at next raising edge to CC0 and at next failing edge to CC1, then you got the period and duty.

    In some special application, you can still use PWM1 failing edge -> CC1 and PWM1 raising edge -> CC0, PWM 2 failing edge -> CC1 and PWM 2 raising edge -> CC0, in this method, you need to manually control the timer counter reload/overflow and calculate each PWM's period and duty.

  • Syscfg offer some common compare/capture method, using MSPM0's timer's hardware feature.

    For example, if you need to detect two pulse width, you need two timer if only use syscfg.

    But you can also use one timer (with 4CC) to capture two PWM's pulse width but need add some extra software function.