大家好,
我在论去中找到的IPC例子工程,仅仅在IPC.c 文件里加了一个变量 int g_flag = 3;在ISR里面让全局变量加1,然后打印出来。但是全局变量仅仅加一了次,打印出的结果全部都是4,请问这是为什么?打印的结果如下:
Set interrupt from Core 0 to Core 1, cycle = 1053673622
Interrupt Info 0
[TMS320C66x_1] Receive interrupt from Core 0 with info 0x0, cycle = 1057016594
g_flag = 4
Set interrupt from Core 1 to Core 2, cycle = 1057033058
Interrupt Info 8
[TMS320C66x_2] Receive interrupt from Core 1 with info 0x0, cycle = 1059235265
g_flag = 4
Set interrupt from Core 2 to Core 3, cycle = 1059251792
Interrupt Info 16
[TMS320C66x_3] Receive interrupt from Core 2 with info 0x10, cycle = 1057523984
g_flag = 4
Set interrupt from Core 3 to Core 4, cycle = 1057540624
Interrupt Info 24
[TMS320C66x_4] Receive interrupt from Core 3 with info 0x10, cycle = 1060312891
g_flag = 4
Set interrupt from Core 4 to Core 5, cycle = 1060329531
Interrupt Info 32
[TMS320C66x_5] Receive interrupt from Core 4 with info 0x20, cycle = 1060791800
g_flag = 4
Set interrupt from Core 5 to Core 6, cycle = 1060808440
Interrupt Info 40
[TMS320C66x_6] Receive interrupt from Core 5 with info 0x20, cycle = 1066910801
g_flag = 4
Set interrupt from Core 6 to Core 7, cycle = 1066927441
Interrupt Info 48
[TMS320C66x_7] Receive interrupt from Core 6 with info 0x30, cycle = 1070451703
g_flag = 4
Set interrupt from Core 7 to Core 0, cycle = 1070468343
Interrupt Info 56
[TMS320C66x_0] Receive interrupt from Core 7 with info 0x30, cycle = 1065998385
g_flag = 4
IPC test passed!