TI提供的OMAP-L138双核通信的库函数的实现方法是:
开辟一段ARM和DSP共用的内存,从而实现共享数据。
我在DSP端使用了32k的数据缓存后,发现当DSP像共享内存中写入数据的时候,只是缓存中发生变化,而实际的内存地址中的数据没有变化。
这个问题应该怎么解决呢?
我尝试在结构体前面加volatile也是不行的:
typedef volatile struct IPC_notifyEvent
{
UInt16 eventId; /* event number */
UInt32 payload; /* 32-bit value to pass to remote CPU */
UInt16 procId; /* space for "sent from" cpu id (future use) */
UInt16 lineId; /* interrupt line */
UInt16 semCnt; /* semaphore */
UInt16 key; /* system key */
} IPC_notifyEvent;