Part Number: TMS570LC4357
Tool/software: Code Composer Studio
I am using a can bus to communicate between three different boards. To test communication, I put two transmissions back to back on my Sender board. In this scenario, the second transmission should only occur when the receiver reads the message (i.e canGetData). However, both of these transmissions occur even if the receiver does nothing.
while(canIsTxMessagePending(canREG1, canMESSAGE_BOX1));
canTransmit(canREG1, canMESSAGE_BOX1, tx[mode]);
while(canIsTxMessagePending(canREG1, canMESSAGE_BOX1));
canTransmit(canREG1, canMESSAGE_BOX1, tx[mode]);
Another problem is, if I do many transmissions in a row, while running a receiving loop(controlled by canIsRxMessageReceived) on the receiving side... Not every message is even received. However if I place a small delay between transmissions
For example:
for(i = 0; i < 30000;i++);
the receiver gets every message and correctly. This doesn't make any sense, the sender should never transmit a message if a sender has not read the data... any idea what is going on here?