Part Number:TMS320C6748
您好,我在使用C6748的芯片中使用一个软中断post了一个邮箱信息,在Task中pend邮箱消息,邮箱max number为100,但是在post完第23条消息的时候,task中pend接收完的消息显示
Memory Map Prevented reading 0x00000001
Memory Map Prevented reading 0x00000005
Memory Map Prevented reading 0x00000007
当我把max number改大之后 问题似乎不见了。
请问是哪里出现了问题??
kaijie zhang:
当我把mailbox max number改为20后,pend也可以收到正确的消息
,
Nancy Wang:
请贴出您使用的SDK版本以及代码。
,
kaijie zhang:
omapl138 PDK 1.0.11
bios 6.82.1.19
// config mailbox in cfg file
var mailbox1Params = new Mailbox.Params();mailbox1Params.instance.name = "hStoreLogMBX";Program.global.hStoreLogMBX = Mailbox.create(8, 100, mailbox1Params);
typedef struct{ enLogDDList LogDD; uint16_t logInstance; uint16_t logData;}stLogMsg;
//Swi
void LogModule_Subscribe(int flag)
{
stLogMsg LogMsg;LogMsg.LogDD = E_LOG_LIST_NUM; LogMsg.logData = 0; LogMsg.logInstance = 0;
switch(flag)
{
case 1:
LogMsg.LogDD = 1;
LogMsg.logData = 1;
LogMsg.logInstance = 1;
break;
}
Mailbox_post(hStoreLogMBX, &LogMsg, 0);
}
//Task
void TskStoreLogExecute(){ stLogMsg LogMsg;
// clear the buffered messages while (Mailbox_pend(hStoreLogMBX, &LogMsg, 0) == TRUE);
while(TRUE) { if(Mailbox_pend(hStoreLogMBX, &LogMsg, BIOS_WAIT_FOREVER) == TRUE) { StoreEvent(&LogMsg); } }}
抱歉无法将全部代码附上
,
kaijie zhang:
我在单步调试中发现,正常LogMsg都是在固定地址0xC04ACE78,但是出错时LogMsg地址到了0x00000001
,
Nancy Wang:
kaijie zhang 说:当我把max number改大之后 问题似乎不见了。
请问什么情况下才会报错,是否有什么规律?
,
kaijie zhang:
每次在post完第23条后,pend收到的msg地址都会报错
,
Nancy Wang:
我需要咨询相关工程师再给您回复。
,
Nancy Wang:
请参考英文论坛的回复并跟进:
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1030839/tms320c6748-mailbox
,
kaijie zhang:
OK 多谢
,
Nancy Wang:
我会将该贴关闭,如果您还有问题,可以继续跟进,谢谢!
TI中文支持网
