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.

UART interrupt request occurring before Master Interrupt Enable in MSP432



I was  debugging my UART code when I noticed that UART interrupt occurred before enabling master interruption. I used the following code to configure interrupts:

/* Enabling interrupts */
MAP_UART_enableInterrupt(EUSCI_A0_MODULE, EUSCI_A_UART_TRANSMIT_INTERRUPT);
MAP_Interrupt_enableInterrupt(INT_EUSCIA0);
MAP_Interrupt_enableMaster();

But after invoking MAP_Interrupt_enableInterrupt(INT_EUSCIA0) call, the code jumps to UART interrupt request routine, before invoking MAP_Interrupt_enableMaster(). This behavior can be seen in the video bellow:

Is this a normal behavior? I always believed that no interrupt could occurs before the  Master Interrupt be enabled.

Remark: I used the interrupt enable sequence suggested by MSPWare code examples.

Thanks!

  • Hello Otavio,

    Are you sure that interrupts weren't already enabled beforehand? And why is an interrupt flag already requesting to be serviced? Does anything change if you were to add the line MAP_Interrupt_disableMaster(); before MAP_UART_enableInterrupt(EUSCI_A0_MODULE, EUSCI_A_UART_RECEIVE_INTERRUPT); to try and delay the interrupt from being serviced?

    Regards,
    Ryan
  • Hello Ryan,

    It seems that interrupts are enabled by default in MSP432. I did some confusion when reading the registers of ARM and just not realizing earlier. Disabling interrupts at the beginning of code, but after halting WDT, seems to have solved.

    Thanks again!

    Best Regards,

**Attention** This is a public forum