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.
另外systick中断时,想避免timer也中断应该如何做。想让程序主要运行在timer中,主程序仅循环处理一些量,如果timer执行时,systick中断,执行systick中断,timer再中断呢,总觉着这样会乱套,有什么写法可以避免这种情况。如果在timer中断时停timer定时器中断,systick中断后再停systick定时器中断,systick结束后打开systick定时器中断,回到timer中断,timer中断完成前打开timer定时器中断,这样做是否可以???
你好,
你可以参考C:\ti\TivaWare_C_Series-2.1.0.12573\docs 里面的SW-EK-TM4C123GXL-UG-2.1.0.12573.pdf文档。
所有的API函数说明里面都有。
你需要调整优先级可以参考TIVAWARE 里面的C:\ti\TivaWare_C_Series-2.1.0.12573\examples\boards\ek-tm4c123gxl\interrupts
这个例程:
说了这么多,具体的函数是:
//
// Set the interrupt priorities so they are all equal.
//
ROM_IntPrioritySet(INT_GPIOA, 0x00);
ROM_IntPrioritySet(INT_GPIOB, 0x00);
ROM_IntPrioritySet(INT_GPIOC, 0x00);
对,就是IntPrioritySet(xx, xx);