TI's SDK for the MSPM0 family has a set of examples. They are all targeting one of their LaunchPad dev kits. In this post, I'm porting another one to the EasyL1105.
The example, pwm_led_driver, changes the brightness of an LED by changing the duty cycle of a timer. It's originally written for the LP-MSPM0L1117 LaunchPad. I'm porting it (just like I did in Port an SDK example to the EasyL1105 MSPM0 board). Changes: I removed the not-used GPIO part, and used a timer + channel that can drive pin PA27 - the green LED on the EasyL1105.
What does it do?
The design uses the TIMG1 peripheral, channel 1, to drive PA27 with a PWM signal: That's the green LED. The duty cycle is continuously changing, to create a pulse light effect. Most of the time, the controller is in sleep mode. It does all the work in an interrupt.
The ccs project with source and config files is attached. Thank you for reading.
ccs project adapted to EasyL1105: 5516.pwm_led_driver_EasyL1105.zip