SLAAEL2 August   2025 MSPM0G1106 , MSPM0G1107 , MSPM0G1506 , MSPM0G1507 , MSPM0G1518 , MSPM0G1519 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1 , MSPM0G3518 , MSPM0G3518-Q1 , MSPM0G3519 , MSPM0G3519-Q1 , MSPM0L1306

 

  1.   1
  2. 1Description
  3. 2Required Peripherals
  4. 3Design Steps
  5. 4Design Considerations
  6. 5Software Flow Chart
  7. 6Application Code
  8. 7Results
  9. 8Additional Resources
  10. 9E2E

Application Code

The application code cycles through the different configurations for frequency and duty cycle based on interrupts triggered by button presses from S1 and S2. To handle button debouncing, the corresponding interrupt is disabled in the interrupt handler, and re-enabled about 10ms after exiting.

 Switch 1 Interrupt
                    Handler Figure 6-1 Switch 1 Interrupt Handler
 Switch Debounce Interrupt
                    Handler Figure 6-2 Switch Debounce Interrupt Handler