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.

TMS320F280049: How to disable individual interrupts without loss

Part Number: TMS320F280049


Tool/software:

Hi,
i am using TMS320F280049 and need some clarification on the disable_interrupt() routine of the driverlib

This routine is used to disable a single interrupt source in the interrupt controller.

For this purpose, the routine performs the following steps:

1) Disable interrupts globally
2) Clear the PIEIER bit for the interrupt
3) Wait 5 cycles to make sure that any propagating interrupt has reached the
CPU IFR register
4) Clear the CPU IFR bit for the interrupt's PIE group
5) Clear the PIEACK bit for the interrupt's PIE group
6) Enable interrupts globally

I wonder if this procedure, especially steps 4 and 5, can cause the loss of other interrupts of the same group.

For example, in my project I use both SCIA_RX and SCIB_RX interrupts, which are in the same group (GROUP 9).
Sometimes, I have to disable only interrupt SCIB_RX for a short time, without losing interrupt SCIA_RX, can I use the routine disable_interrupt() without worries?
Futhermore, if I disable SCIB_RX, do I risk losing one?

TO CONCLUDE:
I need to disable interrupt SCIB_RX without losing ANY interrupts (neither SCIA_RX nor SCIB_RX). Is the disable_interrupt() routine fit for the purpose? Or should another procedure be used?

Thanks in advance

Massimo Ceschi

  • Hi Massimo,

    Where are you calling the Interrupt_disable() driverlib function?

    If calling the function to disable an interrupt inside that interrupt's ISR, you shoud not see any loss of interrupts. This is because if calling it inside the ISR, the group IFR will be flagged by the current ISR's interrupt. And since you are closing the ack afterwards, any other flagged PIEIFR's will be able to propagate through to the ePIE after that (and wouldn't be lost).

    Also keep in mind that disabling SCI RX interrupts will cause you to lose received data on that SCI module if overrun occurs on that SCI module (the data coming in is not read from the FIFO fast enough by the CPU).

    Best Regards,

    Delaney