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.

Can or Can not ? change the priority of interrupt level ?

Other Parts Discussed in Thread: MSP430FG4618

Hi All.

I have a problems when using 2 interrupt source in one programe.

I want to use (I/O Port P1) interrupt  with priority level higher than  (USCI_A0 Transmit/ USCI_A0 Receive) interrupt , but in Interrupt vector Table, the (USCI_A0 Transmit/ USCI_A0 Receive) interrupts have priorities higher than (I/O Port P1) interrupt, invert of my purpose.

By using IAR complier, Can I change the priority level of interrupt source in MSP430FG4618 ?

Pls, help me to solve this problem.

Thanks.

  • Interrupt priorities are fixed. However, they only apply if two interrupts compete (e.g. GIE is clear and two itnerrupts are pending). Once one ISR is entered, GIE is clear and no other interrupts will interfere.
    If you want your ISr to be interrupted by others (but even ones iwht lower priority then), you can manually set GIE insid ethe ISR. But be sure you have cleared the trigger for this ISR before you do, or it will interrupt itself immediately. THis is called "interrupt nesting" and dangerous. (improper implementation will easily lead to stack overflows or malfuncitoning code)
    An exception is the NMI interrupt where a system NMI can interrupt a user NMI (there is no global interrupt masking at all for NMIs except for the individual enable bits)

  • Interrupt priorities on the MSP430 are fixed.  Unfortunately, this can not be changed.

**Attention** This is a public forum