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.

TMS320DM8148: Spurious interrupt handling

Part Number: TMS320DM8148
Other Parts Discussed in Thread: SYSBIOS,

We are using an real time OS on TMS320DM8148 on the ARM side and using sysbios on DSP side.

The ARM IRQ handler sometime get spurious interrupt, but we do not know how the handler shall handle it.

Initially we try to ignore it and just return, but it seems the INT is not cleared and keep firing.

Then we try to handle it normally but the vector is wrong (0x7f) which is not used in our system, causing unhandled INT error.

So what is the proper way to handle spurious IRA for DM814x device?

Thanks.

  • This is from TRM:

    14.3.5 ARM A8 INTC Spurious Interrupt Handling
    The spurious flag indicates whether the result of the sorting (a window of 10 INTC functional clock cycles
    after the interrupt assertion) is invalid. The sorting is invalid if:
    • The interrupt that triggered the sorting is no longer active during the sorting.
    • A change in the mask has affected the result during the sorting time.
    As a result, the values in the INTCPS_MIRn, INTCPS_ILRm, or INTCPS_MIR_SETn registers must not be
    changed while the corresponding interrupt is asserted. Only the active interrupt input that triggered the
    sort can be masked before it turn on the sort. If these registers are changed within the 10-cycle window
    after the interrupt assertion. The resulting values of the following registers become invalid:
    • INTCPS_SIR_IRQ
    • INTCPS_SIR_FIQ
    • INTCPS_IRQ_PRIORITY
    • INTCPS_FIQ_PRIORITY
    This condition is detected for both IRQ and FIQ, and the invalid status is flagged across the
    SPURIOUSIRQFLAG (see NOTE 1) and SPURIOUSFIQFLAG (see NOTE 2) bit fields in the SIR and
    PRIORITY registers. A 0 indicates valid and a 1 indicates invalid interrupt number and priority. The invalid
    indication can be tested in software as a false register value.
  • Hi Liu,

    Yes, DM814x TRM (section 14.3.5) should be followed regarding Spurious Interrupt Handling. See also if the below e2e threads will be in help:

    e2e.ti.com/.../363612
    e2e.ti.com/.../543685
    e2e.ti.com/.../150811
    e2e.ti.com/.../671827
    e2e.ti.com/.../282058

    Regards,
    Pavel