Hello everybody.
I am currently working on a FRDM-KL26Z development board and trying to implement an input signal's Dutycycle measurement using the INPUT CAPTURE function of a TPM. However, the same TPM may have some channels configured for PWM signal generation in the meantime, using its EPWM function.
By my question I mean, if I set the TOIE flag and a CHnIE flag, will both of the interrupts (timer overflow & channel interrupt) be generated and possibly be treated in the same handler?
Thank you in advance for your responses.
Gabi F
已解决! 转到解答。
Hello Gabriel Flueran:
The two interrupts are independent, so they both can be activated.
Actually the interrupt vector is the same, so the interrupt handler must be shared and you need to check the flags to see which interrupt triggered.
I hope this helps.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Gabriel Flueran:
The two interrupts are independent, so they both can be activated.
Actually the interrupt vector is the same, so the interrupt handler must be shared and you need to check the flags to see which interrupt triggered.
I hope this helps.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------