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.

Use of DINT in self test library code - necessary?

Expert 1960 points

Dear TI Folks,

We're currently using TI's MCU self test library (IEC60730) code for run-time periodic self test to confirm the MCU condition. However, it has been noticed that every self test routine calls DINT and EINT before and after the self test code.  This actually caused problem in our normal operation since it disable all interrupts periodically. I tried to remove some DINT and found that the self test code still works correctly. I'm attempting to remove all DINT statement from the self-test code. But I'd like to hear your opinion on why those DINT statements are used anyway, and is there any potential effect we remove them?

Thanks!

  • It is not true that every self-test routine calls DINT and EINT. Those which use interrupts use DINT/EINT when registering and enabling an interrupt.

    Instead of disabling global interrupts, it may be better to disable the interrupt being registered in the PIE (PIEIER registers). There may also be cases in your application where this is not necessary.

    It is true that the simple_demo calls DINT and EINT before each self-test routine executes. This should not be necessary. I believe that the routines which are using interrupts call DINT and EINT in the routine, therefore it should not be necessary to use DINT/EINT from the simple_demo or the higher application level.

    Users of the library should read and modify the source code to fit their system requirements.

    sal
  • I will close this thread. Please let us know if you have any more questions regarding the self test library.

    sal

  • Yes please go ahead to close this. I've just labeled it as "Answered". Thanks for your reply!