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.
Hi stefangachter,
you are asking about interrupt rate not interrupt latency. There's not defined any time, it's code specific.
Regards,
MartinK
Thanks for the quick reply. So, this has to be implemented empirically and tested on each system individually?
C:\Freescale\Freescale MQX 3.8\mqx\examples\benchmrk\timing\results\iar\twrk60n512\twrk60n512_intflash_release.html
System Parameters
Context Switch |
| Service Interrupt and return to task |
| ||||
System Timer/Tick Overhead |
|
Regards,
David
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!
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