Need fast context switch for _int_install_kernel_isr

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Need fast context switch for _int_install_kernel_isr

1,163 次查看
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 项奖励
回复
2 回复数

840 次查看
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 项奖励
回复

840 次查看
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