XGATE ISR size question

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

XGATE ISR size question

108 次查看
roberthiebert
Senior Contributor I

From what I've read in the manuals and application notes, XGATE is designed to service ISRs to take some load off of the CPU. It also states that these ISRs should be kept as short as possible, so I have 2 questions.

First, how short is short? Is there a guide line for the number of instructions that the ISR should be limited to?

Second, why is it necessary to keep these ISRs short, and what happens if they get too long?

Regards,

Robert

0 项奖励
回复
1 回复

71 次查看
kef2
Senior Contributor V
That's just a standard to make Interrupt Service Routines taking as short as possible. ISR's taking longer lead to longer interrupt latency and other potential application issues.
Smaller code often means faster code (small loopy code of some may take very long).
XGATE ISR code is limited by XGATE memory space, which is 64k.
Regarding shortness of ISR, you may decide to not use XGATE interrupts at all and instead trigger one (software) interrupt and never exit from its ISR.
0 项奖励
回复