Part Number: MSP430G2553
Hello,
I am using the above MSP430G2553 microcontroller and need to generate a PWM signal which I am doing with Timer A1 and its CCR2.
I have set the clock source as SMCLK and operating mode as OUTMOD_7 (Reset/SET). TA1CCR0 is handset in code to 0x00FF in order to set the PWM Period. TA1CCR2 is set in software to set the duty cycle.
Even when I set TA1CCR2 to always be equal to a constant and don't touch it anywhere else in code, my output signal is asserting itself to high for random periods of time.
I have ensured that the micro controller never enters into sleep mode. The problem seems to go away when I turn off GIE, so I suspect that I might have a stack overflow problem in my code, but even if I have then this should never happen. I have a break point at boot and the microcontroller is never resetting.
I have read the device Errata and there's a few comments about erroneous interrupts etc on Timer A. But nothing in the datasheet, manual or errata to suggest that this should be happening.
Have I missed something? Is there something that could be perhaps causing this that I've missed?
Regards, Keir
