IntPrioritySet(INT_UART0, 1);
这是配置中断优先级的代码,但是配置完成之后在keil的NVIC显示,配置没有起作用,请问还需要其他的步骤吗?或者是我哪里写错了。
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.
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);
你第二个参数理解错误。