Dear All
I am using MBD toolbox for MPC5744P version 3.0.
There are multiple interrupts for Etimer and I can enable them in MBD (right side picture).
I wqant to take different action on for different interrupts but there is no option in eTimer ISR to select the specific interrupts .
For example, counter may overflow while an edge is detected. I want to detect the number of overflows so I can use them in a calculation. But I can not as I do not know the ISR works for which interrupt.
Please help on this.
ISR HANDLER
Best Regards,
Abhishek
mariuslucianandrei rafael.barbosa@chassisbrakes.com
Solved! Go to Solution.
Hello abhishek.kumar@chassisbrakes.com,
Each eTimer_Config block, initializes and creates code for the Module X, Channel Y selected in the General Tab. All the checked interrupts in the Interrupts tab are enabled for that particular channel.
For example, the images attached configuration initializes the Input Capture 2 interrupt and Overflow interrupt.
Now, for each Channel of the Module, you need to add the eTimer_ISR block, that will handle the interrupt request for the Module X, Channel Y. Each channel has only one interrupt vector, so all the Interrupts sources are muxed together to trigger only one interrupt, Here is ETIMER0_TC1IR_IRQHandler.
Now, what it is important here, is that the eTimer_ISR, returns an interrupt status, which contains the STS status register value. So the user need to include in the S-function attached to the ISR Handler output a logic in order to differentiate the interrupt source. Normally, when an interrupt appears the bit corresponding to that interrupt source is set. For more information, please go to the Reference Manual For MPC5744P.
Also, it is important to know that all the flags are cleared before exiting the interrupt routine.
Hope this helps,
Marius
Hello abhishek.kumar@chassisbrakes.com,
Each eTimer_Config block, initializes and creates code for the Module X, Channel Y selected in the General Tab. All the checked interrupts in the Interrupts tab are enabled for that particular channel.
For example, the images attached configuration initializes the Input Capture 2 interrupt and Overflow interrupt.
Now, for each Channel of the Module, you need to add the eTimer_ISR block, that will handle the interrupt request for the Module X, Channel Y. Each channel has only one interrupt vector, so all the Interrupts sources are muxed together to trigger only one interrupt, Here is ETIMER0_TC1IR_IRQHandler.
Now, what it is important here, is that the eTimer_ISR, returns an interrupt status, which contains the STS status register value. So the user need to include in the S-function attached to the ISR Handler output a logic in order to differentiate the interrupt source. Normally, when an interrupt appears the bit corresponding to that interrupt source is set. For more information, please go to the Reference Manual For MPC5744P.
Also, it is important to know that all the flags are cleared before exiting the interrupt routine.
Hope this helps,
Marius