Minimum Interrupt Latency

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

Minimum Interrupt Latency

1,894 Views
stefangachter
Contributor I

We work with a MCF5232 based system running MQX and I would like to know the minimal necessary delay between two interrupt events, i.e. the minimum time to wait after quitting the ISR until a new interrupt can be triggered to enter the same ISR. I could not find any clear timing description and any advice would be appreciated.

5 Replies

914 Views
c0170
Senior Contributor III

Hi stefangachter,

 

you are asking about interrupt rate not interrupt latency. There's not defined any time, it's code specific.

 

Regards,

MartinK

0 Kudos

914 Views
stefangachter
Contributor I

Thanks for the quick reply. So, this has to be implemented empirically and tested on each system individually?

0 Kudos

914 Views
DavidS
NXP Employee
NXP Employee

C:\Freescale\Freescale MQX 3.8\mqx\examples\benchmrk\timing\results\iar\twrk60n512\twrk60n512_intflash_release.html

System Parameters

Context Switch
4.30us413.12us 1MHz
Service Interrupt and return to task
1.51us145.40us 1MHz
System Timer/Tick Overhead
2.52us

242.40us 1MHz

 

Regards,

David

914 Views
OldPeculier
Contributor II

Your reply is a little cryptic;  What numbers refer to what?

I need to service my FlexCAN ISR in ~100us (the rate that fames can be received).  Possibly can use _int_install_kernel_isr but I have never done a context switch in Freescsale, nor in c.  Any examples for fast context switching?

Thanks very much!

0 Kudos

914 Views
MarkP_
Contributor V

Hi,

One way to improve interrupt response time is to move vectors to RAM by defining in user_config.h:

#define MQX_ROM_VECTORS 0

 

And then installing interrupt routine as kernel-ISR.

Example where PE-generated code is changed to use own interrupt routine:

//DeviceDataPrv->SavedISRSettings_TUInterrupt.isrData = _int_get_isr_data(LDD_ivIndex_INT_FTM0);

//DeviceDataPrv->SavedISRSettings_TUInterrupt.isrFunction = _int_install_isr(LDD_ivIndex_INT_FTM0, PWM_Interrupt, DeviceDataPrv);

//Install own interrupt routine:

_int_install_kernel_isr(LDD_ivIndex_INT_FTM0, PWM_Interrupt_FAST)

 

This own interrupt routine is jumped directly from vector.

Note that MQX-services cannot be used from this own interrupt routine (not sure about this).

~Mark

0 Kudos