Part Number: MSPM0G1507
Other Parts Discussed in Thread: SYSCONFIG
Hi,
In my application, I have a constant 351.6kHz PWM generated from the internal 32MHz oscillator using a total divider of 91. It is 50% duty cycle. When the device sits in an infinite loop with WFE() the PWM is a stable, fixed frequency around 351kHz. However, once an interrupt kicks in, driven by the comparator driving a capture timer using events, the PWM output shifts to 353kHz. When the interrupt kicks in there is additional processing in the main loop that happens before going back to the while loop with WFE(). The code never changes the PWM output, it is enabled through SYSCONFIG only, so it should be running independently and entirely HW controlled. The PWM also appears to have more noise in addition to the frequency shift, maybe not unexpected due to the additional digital switching of the MCU. However, the fixed frequency shift seems strange.
Is there a way to reduce the impact of MCU processing on the internal clock? Or will I need to move to an external crystal to improve the stability?
Thanks,
Matthew Guibord