E-Timer Interrupt ISR, all options not available (MBD for MPC57x)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

E-Timer Interrupt ISR, all options not available (MBD for MPC57x)

Jump to solution
783 Views
abhishek_kumar1
Contributor IV

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.

pastedImage_1.pngpastedImage_2.png

ISR HANDLER

pastedImage_3.png

Best Regards,

Abhishek

mariuslucianandreirafael.barbosa@chassisbrakes.com

Tags (1)
1 Solution
661 Views
mariuslucianand
NXP Employee
NXP Employee

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. 

pastedImage_1.png

pastedImage_3.png

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.

pastedImage_4.png

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.

pastedImage_5.png

Also, it is important to know that all the flags are cleared before exiting the interrupt routine.

Hope this helps,

Marius

View solution in original post

1 Reply
662 Views
mariuslucianand
NXP Employee
NXP Employee

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. 

pastedImage_1.png

pastedImage_3.png

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.

pastedImage_4.png

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.

pastedImage_5.png

Also, it is important to know that all the flags are cleared before exiting the interrupt routine.

Hope this helps,

Marius