Other Parts Discussed in Thread: SYSBIOS
Hi VIvek,
Could you help me solve the following problem?
I want to receive multi-ID CAN messages(0x500~0x51F) and follow your instructions below.
1. "system_dcan.c" changes
- Change 'ENABLE_B2B_DCAN_TEST' value to '1', this is to take DCAN out of loopback mode
- In 'System_dcanInitCfgStruct()', change 'dcanConfig->rxMsgId' to '0x500'
2. "utils_dcan.c" changes
- In 'Utils_dcanInitDefaultMbx2MsgIdMap()', change 'dcanMbx2MsgIdMap[0].msgId' to '0x500'
- In 'Utils_dcanInitRxMsgObjParams()', change 'pDcanRxCfgPrms->msgIdentifierMask' to '0x1F03FFFF'
And print message ID in "system_dcan.c" as below
static Void System_dcanRxMsgHandler(dcanMsg_t *rxMsg)
{
...
Vps_printf("Id[0x%X] \n",rxMsg->appMsgPrms.rxMsgIdentifier>>18U);
...
}
After compilation, I ran the program but it crashed, and show following information.
[IPU1-1] 10.923168 s: Id[0x500]
[IPU1-1] 10.923930 s: Id[0x501]
[IPU1-1] 10.924693 s: Id[0x502]
[IPU1-1] 10.925150 s: Assertion @ Line: 400 in /ssd1/ethan/vsdk3.2/vision_sdk/apps/src/rtos/modules/dcan/utils_dcan.c: status == 0 : failed !!!
[IPU1-1] 10.925333 s:
[IPU1-1] 10.925364 s: ### XDC ASSERT - ERROR CALLBACK START ###
[IPU1-1] 10.925425 s:
[IPU1-1] 10.925547 s: assertion failure: A_badContext: bad calling context. See GateMutex API doc for details.
[IPU1-1] 10.925638 s:
[IPU1-1] 10.925669 s: ### XDC ASSERT - ERROR CALLBACK END ###
[IPU1-1] 10.925760 s:
[IPU1-1] 10.926005 s: ti.sysbios.gates.GateMutex: line 99: ti.sysbios.gates.GateMutex: line 99: assertion failure: A_badContext: bad calling context. See GateMutex API doc for details.
[IPU1-1] 10.926218 s: xdc.runtime.Error.raise: terminating execution
I reverted pDcanRxCfgPrms->msgIdentifierMask to default value(0x1FFFFFFF), then the program can work, but message ID only shows "0x500" continuously.
This problem is urgent to me. I would like to express my sincere thanks to you.
Best Regards,
Ethan Liao