ROM_IntPrioritySet(INT_UART1,0);
ROM_IntPrioritySet(INT_GPIOF,1);
ROM_IntPrioritySet(INT_UART5,2);
ROM_IntPrioritySet(INT_TIMER0A,3);这样设置中断优先级有什么不妥吗关键我还有一个SysTickIntRegister(SysTickIntHandler);
望指教,谢谢
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.
ROM_IntPrioritySet(INT_UART1,0);
ROM_IntPrioritySet(INT_GPIOF,1);
ROM_IntPrioritySet(INT_UART5,2);
ROM_IntPrioritySet(INT_TIMER0A,3);这样设置中断优先级有什么不妥吗关键我还有一个SysTickIntRegister(SysTickIntHandler);
望指教,谢谢
The hardware priority mechanism will only look at the upper 3 bits of the priority level, so
any prioritization must be performed in those bits.
正确的设置是:
ROM_IntPrioritySet(INT_UART1,0 << 5);
ROM_IntPrioritySet(INT_GPIOF,1 << 5);
ROM_IntPrioritySet(INT_UART5,2 << 5);
ROM_IntPrioritySet(INT_TIMER0A,3 << 5);
最低优先级为 0x07 << 5