care must be taken while writing ISRs as opposed to normal sub routines

Embedded C interview Question

What care must you take while writing ISRs as opposed to normal sub routines?

Answer

Special care is required when writing an interrupt handler to ensure that either the interrupt, which triggered the handler’s execution, is masked out (inhibited) until the handler exits, or the handler is re-entrant so that multiple concurrent invocations will not interfere with each other.

No comments:

Post a comment