This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0L1306: Using timer - pwm as communication frame, need suggestions

Part Number: MSPM0L1306

Hi experts,

My customer is using timer - pwm for communication. For example, pwm with 25% duty represent 0, pwm with 75% duty represent 1, so a continuous pwm with different duty can represent serial data.

To generate such pwm, they need to change the duty of pwm cycle by cycle. One way to do it is changing the compare register in each interrupt. 

However, the pwm is at high frequency, the period is 1.25 us. An empty interrupt service function may already longer than the pwm period, so it's not fast enough to change the compare register in the interrupt.

For pwm of such high frequency, any suggestion on how to change its duty cycle by cycle?

Regards,

Hang.