Post Go back to editing

Handling interrupts in a synchronous way without nesting interrupts in VDK

Hi Craig,

many thanks for your help. I did understand what you have suggested and the tmk_ExceptionHandler does no longer occur. I have one additional question. If I want to handle interrupts in a synchronous way without allowing nesting interrupts what do I need to do! I would like to have it in this ways that interrupts are queued one after each other and synchronous processed without nesting interrupts. What do I need to do for this? I have looked to the online help and into the BF561 but I could not find anything.



  • For interrupt nesting to happen on Blackfin it is necessary for each interrupt service routine (ISR) to perform PUSH RETI shortly after entry and POP RETI shortly before returning from the ISR. Unless the contents of the RETI register are saved in this way the global interrupt disable (bit 4 in IPEND) will remain set (1) for the duration of the ISR and will prevent any other interrupts (even of higher-priority) from being serviced. This mechanism is provided by the hardware in order to protect the return address in RETI from being overwritten by a nested interrupt.

    So in order to avoid interrupt nesting, all you need to do is ensure that none of your ISRs contain the PUSH RET/POP RETI code. If you are writing your ISRs in assembly using the VDK templates then you can simply delete these instructions. If you are writing your ISRs in C then you should declare them with EX_INTERRUPT_HANDLER() instead of EX_REENTRANT_HANDLER().

    If this doesn't answer your question then please give more detail about how your are implementing your ISRs.

  • Hi Brian,

    When using declaring ISRs in C using EX_INTERRUPT_HANDLER(), will the subsequent interrupts build a queue or be lost completely?