MAP_Interrupt_setPriority(INT_TA3_0, 0x50);
gaoyang9992006:
不太清楚,其他的优先级数被使用了吗,如果没有换0x20和0x40试试看,我看官方例子是用的这两个。
user4974765:
回复 Susan Yang:
MAP_Interrupt_setPriority(INT_PORT6, 0x40);//keyMAP_Interrupt_setPriority(INT_ADC14, 0x60); MAP_Interrupt_setPriority(INT_EUSCIA0, 0x20); MAP_Interrupt_setPriority(INT_EUSCIA1, 0x20);//UARTMAP_Interrupt_setPriority(INT_EUSCIA3, 0x20);//flashMAP_Interrupt_setPriority(INT_EUSCIB0, 0x20); //EmppromMAP_Interrupt_setPriority(INT_PORT2, 0x80); MAP_Interrupt_setPriority(INT_RTC_C, 0xE0);MAP_Interrupt_setPriority(INT_WDT_A, 0xC0);
在重新分配有效的优先级后,发现在程序运行时,部分全局变量会突变;
debug发现定义的boolg_TempType=false;externboolg_TempType;
Watch窗口的值g_TempType=0x88;
是不是由于定义的堆栈空间不足引起的?以下是我的堆栈分配情况:
"A0":place at 0x00000000 { ro section .intvec };
"P1":place in [from 0x00000000 to 0x0003ffff] |[from 0x00200000 to 0x00203fff] { ro };
define block CSTACK with size = 12K, alignment = 8 { };
define block HEAP with size = 8K, alignment = 8 { };
"P3":place in [from0x01000000to0x0100ffffrepeat2displacement 0x1f000000] { rw, block CSTACK, block HEAP };
do not initialize { section .noinit };
initialize by copy { rw };No sections matched the following patterns:
ro section application_specific_roin "P2|P4"rw section application_specific_rwin "P2|P4"
gaoyang9992006:
回复 user4974765:
你自己修改了默认的堆栈配置?用官方默认的试试看。
user4974765:
回复 gaoyang9992006:
用官方默认堆栈配置,试了仍然无法解决,全局变量被覆盖问题;
"A0":place at 0x00000000 { ro section .intvec };
"P1":place in [from 0x00000000 to 0x0003ffff] |[from 0x00200000 to 0x00203fff] { ro };
define block CSTACK with size = 8K, alignment = 8 { };
define block HEAP with size = 16K, alignment = 8 { };
"P3":place in [from0x01000000to0x0100ffffrepeat2displacement 0x1f000000] { rw, block CSTACK, block HEAP };
do not initialize { section .noinit };
initialize by copy { rw };
gaoyang9992006:
回复 user4974765:
这个中断优先级的解决了没,之前那个全局变量被串改的事情解决了没,是什么原因引起的?