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.

Tiva中改变中断优先级的办法和解析

使用void IntPrioritySet(uint32_t ui32Interrupt, uint8_t ui8Priority)函数来设置。

This function is used to set the priority of an interrupt. The ui32Interrupt parameter must be
one of the valid INT_ values listed in Peripheral Driver Library User’s Guide and defined in the
inc/hw_ints.h header file. The ui8Priority parameter specifies the interrupts hardware priority
level of the interrupt in the interrupt controller. When multiple interrupts are asserted simultaneously,
the ones with the highest priority are processed before the lower priority interrupts.
Smaller numbers correspond to higher interrupt priorities; priority 0 is the highest interrupt
priority.

//
// Set the UART 0 interrupt priority to the lowest priority.
//
IntPrioritySet(INT_UART0, 0xE0);
//
// Set the USB 0 interrupt priority to the highest priority.
//
IntPrioritySet(INT_USB0, 0);