Need fast context switch for _int_install_kernel_isr

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

Need fast context switch for _int_install_kernel_isr

660 Views
OldPeculier
Contributor II

I need to service my FlexCAN ISR in ~100us (the rate that fames can be received).

Presently, _int_install_isr is taking 184us to over 354us.  FlexCAN interrupt level is 6.

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
2 Replies

337 Views
c0170
Senior Contributor III

Hello Martin Hess,

just  install isr for your vector with int_install_kernel_isr , enable vectors to be in RAM and measure the ISR invokation time. Is it around 100us?

You ensure that your ISR routine outside of MQX "world" does not invoke any MQX internal functions.

Regards,

c1070

0 Kudos

337 Views
OldPeculier
Contributor II

The solution to context switching in 'C' when using _int_install_kernel_isr proved to be the use of __declspec(interrupt) in front of my isr definition.

The partial solution to latency was to run from flash rather then NRAM.  At best latency is now ~110us as it should be, but at worst is still over 300us.  So something in MQX or RTCS is disabling interrupts.  Note that my ISR is level 6.

Martin Hess