hello, everyone:
I want to use eMIOS_0[13] generate PWM, and to use eMIOS_0[12] as input capture in interrupt mode. However, eMIOS_0[13] is always triggers an interrupt even though used function EMIOS_DRV_ChannelDisableIsrRequest(0U, 13U);.
So, I wonder how to distinguish interrupt source?
Solved! Go to Solution.
Hi,
it looks like you use MPC5748G, right? On this device, two EMIOS channels share the same interrupt vector. So, it's necessary to use function EMIOS_DRV_ReadFlagState at the beginning of interrupt handler to know which channel will be serviced by this interrupt.
Regards,
Lukas
Hi,
it looks like you use MPC5748G, right? On this device, two EMIOS channels share the same interrupt vector. So, it's necessary to use function EMIOS_DRV_ReadFlagState at the beginning of interrupt handler to know which channel will be serviced by this interrupt.
Regards,
Lukas
Hi, lukaszadrapa,
Thanks, it is perfect to use function EMIOS_DRV_ReadFlagState to distinguish interrupt sources.
And another question: I want to use eMIOS_0[13] generate PWM, and to use eMIOS_0[12] as input capture in interrupt mode,however, eMIOS_0[12] always capture the PWM gengrated by eMIOS_0[13], and cannot capture external input. How to avoid this ?
My configuration is as follows:
My relevant code:
I have solve this, it's my hardware problem.
Hi Thomas,
I want to use emios 1 channel 6 as input capture with counter bus A to capture the pwm generetad by emios 0 ch 23 mode opwfmb . I visualize my pwm generetad by emios 0 channel 23 with oscilloscope. The problem that i receive 0 when i want to measure this signal with ipm mode. I attached thé external pin together with jumper. Can you help me with your code? . I use the function get-last measurement but the retvalue is always 0.