各位TI工程师,各位大神好。我在项目中采用IPC中断通知的方式达到核间通信,目前已实现主核core0与另外4个核之间的IPC中断触发响应,我有个问题是:如果我4个从核同时处理完数据向主核core0发送IPC中断,主核core0偶尔会存在掉中断的现象,也就是发生了中断冲突,主核识别不到某些从核发出的中断,这个要怎么处理呢?急求回答,裸机开发没上sys/bios
Shine:
请问在ISR里是否查询IPCAR寄存器里所有的SRCC位吗?当中断被响应后要及时清除中断确认寄存器(SRCC)中的状态位,以便接收下一次中断请求,清除方法是将对应的SRCC位置写1即可。
user6109135:
回复 Shine:
if(read_ipcgr==0x10){read_ipc[0]=1;KICK0 = KICK0_UNLOCK;KICK1 = KICK1_UNLOCK;*(volatile uint32_t *) iIPCARInfo[CoreNum] = 0x10;KICK0 = KICK_LOCK;KICK1 = KICK_LOCK;// printf("111111111\n");}if(read_ipcgr==0x20){read_ipc[1]=1;KICK0 = KICK0_UNLOCK;KICK1 = KICK1_UNLOCK;*(volatile uint32_t *) iIPCARInfo[CoreNum] = 0x20;KICK0 = KICK_LOCK;KICK1 = KICK_LOCK;// printf("22222222\n");}if(read_ipcgr==0x40){read_ipc[2]=1;KICK0 = KICK0_UNLOCK;KICK1 = KICK1_UNLOCK;*(volatile uint32_t *) iIPCARInfo[CoreNum] = 0x40;KICK0 = KICK_LOCK;KICK1 = KICK_LOCK;// printf("3333333333\n");}if(read_ipcgr==0x80){read_ipc[3]=1;KICK0 = KICK0_UNLOCK;KICK1 = KICK1_UNLOCK;*(volatile uint32_t *) iIPCARInfo[CoreNum] = 0x80;KICK0 = KICK_LOCK;KICK1 = KICK_LOCK;// printf("444444444\n");}这个是我的主核的中断服务函数里的一部分,10,20,40,80分别对应4个从核向主核发中断时IPCGR寄存器里的赋值,主核这里应该是都确认了。但是偶尔会冲突,只能收到三个从核发过来的中断
Shine:
回复 user6109135:
“只能收到三个从核发过来的中断”,是能收到固定的三个从核中断还是随机的三个从核中断?