I have some hardware processes the raises some interrupts. The software part must wait for all interrupts completed. But I have no knowledge about the numer of events.
Is there a way to check for still pending interrupts. I only found functions to clear the queue.
You also should disable the affected interrupts (or maybe all interrupts) before you check for pending ones. Otherwise an interrupt can be triggered the exact moment you detected out that none are active - and then you are screwed 🙂
You can read the "set pending" register (API in the isr_x.h file) for isr_2 the code is:
if (*isr_2_INTC_SET_PD & (uint32)isr_2__INTC_MASK) ... You can use the same method to check all the interrupt registers