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.

RM46L852: How to get interrupt ID?

Part Number: RM46L852
Other Parts Discussed in Thread: SEGGER

Tool/software:

Hi!

I'm building a project using the TI ARM compiler, which is configured for C11.

I'm struggling to identify the current active interrupt.

Here's more context:

I'm trying to port SEGGER SystemView for the TI RM46.
Part of this port is a function to get the interrupt "ID".
You can see the function signature below:

U32 SEGGER_SYSVIEW_X_GetInterruptId(void)

This number can be anything, but I figure I could use the VIM offset as ID, using IRQINDEX:

U32 SEGGER_SYSVIEW_X_GetInterruptId(void)
{
    uint32_t const irq_index = (vimREG->IRQINDEX);
    return irq_index;
}

 

This strategy does not work. Regardless of the interrupt triggered, it always reads 0.

Do you have a suggestion on how to reliably identify the current IRQ/FIQ?

Best,
Gabriel