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.

TMS320F28388D: register INTM is not being set

Part Number: TMS320F28388D

Hello everyone,

I´m debugging TMS320F28388D with Lauterbach and I´m experiencing an unexpected behaviour of DINT instruction, that is it never sets INTM to 1. Conversely the EINT instruction correctly sets INTM to 0.

I inspected the generated assembler code and DINT is correctly "converted" to the "SETC INTM" instruction.  

Is there any reason or condition why DINT may not be able to set INTM to 1?

Thank you in advance.

Ivan

  • Hi Ivan,

    The instruction itself should not have any issue, but one possibility I can immediately think of is if another function is setting INTM to 1 (during an interrupt that may not be noticed to be occurring). Interrupts set INTM to 1 during entry of the ISR. Is it possible another interrupt is triggering while looking at INTM?

    Regards,

    Vince

  • Hi Vince,

    thank you for your reply. 

    Actually this behavior can be observed also very early at the initialization phase, during which no interrupts are configured/enabled.

    Here en excerpt of the code:

     
     DINT;                                         /* disable interrupts globally              */
     !!!----> DINT here never sets INTM to 1 (visible in Lauterbach Registers window)
     !!!----> Although I manipulate INTM to 0, a re-execution 
     !!!----> of DINT, through a changing of the program counter (set PC in Lauterbach),
     !!!----> has not effect, that is INTM remains set to 0. 
     
     IER = 0x0;                                    /* disable all interrupts groups            */
     IFR = 0x0;                                    /* clear all CPU interrupt flags            */
     EINT;                                         /* enable all interrupts                    */
     !!!----> Conversely in this case, EINTM sets always INTM to 0

    The question is: who/what may prevent INTM to be set to 1? 

    Generally speaking: the only moment (as expected) I see it set to 1 is when I enter an interrupt handler, that is expected as, acc. to the manual, when an interrupt is triggered the CPU does, among the others, set INTM to 1 (i.e.: once entered an interrupt handler the interrupts are globally disabled).

    Any software attempts to set INTM to 1 (SETC INTM instruction) does not work. 

    Any suggestions is appreciated. Thank you.

    Regards,

    Ivan

  • Hi Ivan,

    I am wondering if this is actually more of an issue with the "Registers View" rather than INTM actually still remaining 0 after DINT.

    Can you please once try to add a HWREGH read of the INTM field into a variable immediately after the "DINT;" command? Basically, I want to see if a variable store of INTM will show that it is actually updated.

    Regards,

    Vince

  • Hi Vince, 

    so INTM view is definitely not updated  in Lauterbach. I´ve tried with CCS Code Studio and there the INTM gets correctly updated.

    Thanks for your support.

    Regards,

    Ivan