This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DCAN communication

Other Parts Discussed in Thread: TMS570LS0432

 Hello,

I did TMS570LS0432 example according to this video  ( http://www.youtube.com/watch?v=TrKQN-sor-s ).
And I don't find the way how to send more than 8 chars at once, I'd like to send a message of 150 chars at once.

Besides, maybe you can explain how to use  ( canTransmit(canREG1, canMESSAGE_BOX1, tx_data);  ) function, specifically 'canMESSAGE_BOX1' field. If I suppose correctly, it's related with splitting data to send in separate pieces.

Regards

  • Hi Vytautas,

    The CAN 2.0 has restriction that each message is max at 8 bytes.  Assume each character is one byte, you can only send 8 character per message.  However, you can send continuous messages to the same destination and the destination can combine them into a 256 char message.

    The canMESSAGE_BOX1 field indicates which mailbox you want to use to send the data.  The DCAN has around 64 to 32 mailboxes depending on which device and its configuration.  So, canMESSAGE_BOX1 is the mailbox ID that you want to store the tx_data that you want to send out.

    Hope this helps you. 

  • Hello Henry,

    Thank you for reply.

    It's still not clear how this 'canMESSAGE_BOX' work. Is it:

    1. You can have 32x256 bytes of data received or get ready to send.

    2. Or you can have 32 terminals connected to the CAN bus, which are addressed by the number of BOX.


    Regards

  • Vytautas,

    A CAN mailbox is defined as a message object that can be used for transmit or receive.

    Each DCAN instance in the TMS570/RM<xyz> devices has a fixed number of mailbox that you can check in datasheet or TRM.

    Each of these mailbox has filtering capability that you can accept a certain incoming CAN frame.  

    I would suggest that you read the TRM DCAN chapter to understand a bit more about the mailbox.

    The canMESSAGE_BOX refers to the mailbox.  Does it make sense?