This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Fast interrupt processing

I need to process an input signal at 40KHz rate. I want to generate an interrupt at 40KHz rate and do the processing of the input in the interrupt routine.

Is it possible to use interrupts with very low overhead? Is it for instance possible to only store those registers that actually are used in the interrupt routine?

Can I write the interrupt routine in assembly?

Is there a software manual describing these possibilities?