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.

TMS320F280025-Q1: C2000 microcontrollers forum

Part Number: TMS320F280025-Q1


Hello,

while going through reference manual related to interrupts, I have found two assembly instruction,

1) uint16 u16IntState=__disable_interrupts()
2) __restore_interrupts(u16IntState)


Not able to find much details on these instruction, how to use it and how it is different from DINT and EINT.

Please provide brief overview or any reference document.

Thank you. BR.

  • Hello Jay,

    The comments for these functions refer to the compiler user's guide as they are compiler intrisics, so I've included a screenshot of the assembly that seems to be generated for these functions:

    Let me know if you have further questions

  • Hi Omer,

    I've already gone through the compiler's user guide, but I couldn't find much information on the use of these instructions. I have the following doubts:

    1. DINT and EINT are also used for disabling and enabling interrupts. What is the difference between these instructions and the ones mentioned above?

    2. Could you please suggest some documentation where I can find examples using the instructions mentioned above? This would help clarify their use cases.

    Regards,

  • Hi Jay,

    DINT and EINT are also used for disabling and enabling interrupts. What is the difference between these instructions and the ones mentioned above?

    I believe the difference is in the number of cycles it takes, although I'm not sure what case you would not use DINT/EINT over the intrinsic functions.

    Could you please suggest some documentation where I can find examples using the instructions mentioned above? This would help clarify their use cases.

    There is no documentation provided from C2000 on this, I will forward this question to the compiler experts in case they know more about the difference between DINT/EINT and the intrinsic enable/disable interrupts functions.

  • please suggest some documentation where I can find examples using the instructions mentioned above?

    Please see the final reply in this forum thread.

    Thanks and regards,

    -George