Hi Team
The customer use CAN module and has the following problem.
They set three objects (30, 31, 32) by Tivaware CANMessageSet. But Only the massage object 32 is transmitted.
However, if they leave the interval between CANMessageSet executions by debugging or set wait cycles, all three massage objects are sent correctly.
Do you have any suggestion for this problem?
Here is the code.
*****************
#define TXOBJECT_ST 30
#define TXOBJECT_END 32
uint8_t g_ui8CAN0TXMsgData[3][8];
tCANMsgObject g_sCAN0TxMessage[3];
int main(void)
{
uint32_t mno;
uint32_t count, s_count;
uint32_t status;
// massage Initialization
g_sCAN0TxMessage[0].ui32MsgIDMask = 0;
g_sCAN0TxMessage[0].pui8MsgData = (uint8_t *)(&g_ui8CAN0TXMsgData[0][0]);
g_sCAN0TxMessage[1].ui32MsgIDMask = 0;
g_sCAN0TxMessage[1].pui8MsgData = (uint8_t *)(&g_ui8CAN0TXMsgData[1][0]);
g_sCAN0TxMessage[2].ui32MsgIDMask = 0;
g_sCAN0TxMessage[2].pui8MsgData = (uint8_t *)(&g_ui8CAN0TXMsgData[2][0]);
//data TX process
for(count=0; count<10; count++){
for(s_count=TXOBJECT_ST; s_count <= TXOBJECT_END; s_count++){
mno = s_count - TXOBJECT_ST;
g_ui8CAN0TXMsgData[mno][0] = count*3 + mno;
g_ui8CAN0TXMsgData[mno][1] = count*3 + mno;
g_ui8CAN0TXMsgData[mno][2] = count*3 + mno;
g_ui8CAN0TXMsgData[mno][3] = count*3 + mno;
g_ui8CAN0TXMsgData[mno][4] = count*3 + mno;
g_ui8CAN0TXMsgData[mno][5] = count*3 + mno;
g_ui8CAN0TXMsgData[mno][6] = count*3 + mno;
g_ui8CAN0TXMsgData[mno][7] = count*3 + mno;
g_sCAN0TxMessage[mno].ui32MsgID = 0x10000000 + count*3 + mno;
g_sCAN0TxMessage[mno].ui32MsgLen = 8;
CANMessageSet(CAN0_BASE, s_count, &g_sCAN0TxMessage[mno], MSG_OBJ_TYPE_TX);
}
while(1){
status = (CANStatusGet(CAN0_BASE, CAN_STS_TXREQUEST) & 0xE0000000);
if(status == 0){
break;
}
}
}
}
*****************
Thanks and Best regards,
Kuerbis