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.

TMS320F280023C: Difference between EINT/DINT and setting/clearing IER bits

Part Number: TMS320F280023C

Hello,

I was recently writing some code for ADCs, and wanted a section of my code to be interrupt protected.

I initially tried to write my code with DINT/EINT around that section, but it wasn't working correctly.

When I swapped those statements with IER &= ~(M_INT10) and IER |= (M_INT10) respectively, things worked as intended.

I would like to know the precise difference between these two types of "interrupt guards". I thought they were equivalent, but clearly they are not. 

Please help me understand when to use which method. I can share more details about the code if needed.

Regards,

Vishnu

  • Hi Vishnu,

    Thanks for your question. EINT/DINT are used to modify the INTM bit (which is the last level interrupt enable/disable). The IER bits are used at the interrupt group level. Please see diagram from the TRM below for visualization:

    Regards,

    Vince