There is a problem about TC275 CAN FIFO

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I have a problem about TC275 CAN FIFO ,
my code about initialize CAN (Fragment):

IfxMultican_Can_MsgObj_initConfig(&canMsgObjConfig, &CanNode0);

canMsgObjConfig.msgObjId = 33;
canMsgObjConfig.msgObjCount = 8;
canMsgObjConfig.firstSlaveObjId = 34;
canMsgObjConfig.messageId = 1;
canMsgObjConfig.acceptanceMask = 0;
canMsgObjConfig.frame = IfxMultican_Frame_transmit;
canMsgObjConfig.control.messageLen = IfxMultican_DataLengthCode_8;
canMsgObjConfig.control.extendedFrame = FALSE;
canMsgObjConfig.control.matchingId = FALSE;

IfxMultican_Can_MsgObj_init(&CanMsgObjTx0, &canMsgObjConfig);

My User Code:

if do this :

for (i = 0; i < 8; i++)
{
while( IfxMultican_Can_MsgObj_sendMessage(&CanMsgObjTx0, &txMsg) == IfxMultican_Status_notSentBusy );
}

It can be transmitted normally !

but if do this :

for (i = 0; i < 4; i++)
{
while( IfxMultican_Can_MsgObj_sendMessage(&CanMsgObjTx0, &txMsg) == IfxMultican_Status_notSentBusy );
}

It can only be transmitted once ,the second time be transmitted is failed !
It can not be sent continuously.

Does anyone have this problem, who can help me?
0 Likes
1 Reply
Not applicable
canMsgObjConfig.control.messageLen = IfxMultican_DataLengthCode_8;

didn't run this code but if you set your data length to 8 you have to give it 8 bytes...
0 Likes