Part Number: MSP430F5529
Good evening, I have looked for a while to find out how to solve my issue, most probably is really easy to solve. But I couldn't find any similar problem till now.
Background: I am using all the 14 pwm outputs it means that al the TxxCCR0s are fixed to match the pwm periods.
The issue: I need to switch on the output with a delay time after a trigger command (that is fixed as input variable, so can't use __delay_cycle(xxx)), then the MCU lets the pwm ON, being able to attend USB interruptions and following the main program, but after period of time switch OFF the pwm outputs. So I need to measure two delays times that are gave by an user as a variables; first between the trigger and ON and second between ON and OFF. Both time are different each other and both can variate during the execution of the main software but non during the pwms operation.
I wanted to use RTC_A interruptions but I don't realize how to configure it in counter mode to do this two delays, they should be in order of hundreds of milliseconds and I'm using a SMCLK = 8Mhz.
I will be grateful if you can give me some ideas how to solve this thing without to do a loop that will generate some miss functions, in case messages from USB/CDC port could arrive and requiring som MCU activities.
Thank you