SDAA028 June   2025 MSPM0C1104 , MSPM0C1105 , MSPM0C1106 , MSPM0G1106 , MSPM0G1107 , MSPM0G1506 , MSPM0G1507 , MSPM0G1518 , MSPM0G1519 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1 , MSPM0G3518 , MSPM0G3518-Q1 , MSPM0G3519 , MSPM0G3519-Q1 , MSPM0H3216 , MSPM0L1306

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction to MSPM0 Timer Capture and Compare Module
  5. 2Implementations for Capturing 0% or 100% Duty Cycle
    1. 2.1 Application Conditions
    2. 2.2 Implementation Introduction
      1. 2.2.1 Use COMP Detect High or Low
      2. 2.2.2 Use ADC Detect High and Low
      3. 2.2.3 Use GPIO Detect High or Low
  6. 3Demo Code Running
  7. 4Summary
  8. 5References

Demo Code Running

This application note provides three different demo codes that using COMP, ADC and GPIO for 0% or 100% duty cycle high or low detection. The demo can be tested with LP-MSPM0L1306. The signals assignment is shown in Table 3-1.

Table 3-1 Signals Assignment Test with LP-MSPM0L1306
Signals LP-MSPM0L1306 Description
PWM PA12 Generate PWM running at frequency of 125Hz; the duty cycle changes between 0%, 50% and 100%
Capture PA26 Capture PWM duty cycles
Capture GPIO PA25 Used for 0% or 100% duty cycle high or low detection (only the GPIO implementation is needed)
UART PA8 Print every PWM duty cycles with 9600 baud rate
Debug GPIOs PA0, PA1, PA3 For debug (currently the PA0 is used to monitor all TIMER1 interrupts, PA1 is used to monitor PWM edge capture interrupts and PA3 is used to monitor TIMER1 zero event interrupts)

The software can be downloaded at software demo.

The COMP demo code is used as an example to show how to run the demo below.

  1. Import the demo code into CCS and build
  2. Use a jumper wire to connect PA12 and PA26
  3. Use logic analyzer like Seleae to monitor the signals (PWM, UART and debug GPIOs)
  4. Connect LP-MSPM0L1306 to a PC and download the code into the board
  5. Turn on the logic analyzer to start the capture and run the code
  6. The capture results are shown below
 Test Results Signals Captured
                    by Seleae Figure 3-1 Test Results Signals Captured by Seleae