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.
Hi,
We are using MSP430G2553 MCU and we have multiple modes where both the timers are used along with GPIO interrupt. We are also using RO_PINOSC_TA0_WDTp (.measGateSource= GATE_WDT_SMCLK, .accumulationCycles= WDTp_GATE_8192) for 2 buttons. MCU uses TA0 as a general purpose timer and the timer is loaded and started after every scan of buttons. Timer is running with SMCLK and in continuous mode with ID_3.
We are also using TA0CCR1 for generating PWM (loading different values to TA0CCR1, setting and clearing the GPIO). This part is working fine.
We have one mode which uses TA1 (Clock is ACLK and mode is UP mode) and GPIO interrupt. When we enable that mode and load TA1CCR0 registers with different values. Every 10ms the GPIO interrupt is trigger and we are clearing the interrupt flag and edge is changed and we are reloading the TA1CCR0 register and starting the timer in ISR, in this condition the PWM is not properly generated. The PWM output PIN will stay high or low for some some time.
Can anyone let me know how to solve this issue.
Thanks,
Sreekanth
Hi Sreekanth,
Maybe you can refer to those example code and debug by step to diagnosis your issue.
https://dev.ti.com/tirex/explore/node?node=ALFfIDtjUH-HwRytz.WJPQ__IOGqZri__LATEST
Thanks!
Best Regards
Johnson
Hi Johnson,
We have gone through those files, it didn't help much.
Thanks,
Sreekanth
Can you post the code for the GPIO interrupt?
The TA0 CCRs aren't buffered, so one possibility is that your CCR update "misses" and the PWM does nothing (or multiple things) for one PWM cycle.
**Attention** This is a public forum