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.

LAUNCHXL2-TMS57012: CAN Test for LAUNCHXL2-TMS57012 launchpad

Part Number: LAUNCHXL2-TMS57012
Other Parts Discussed in Thread: HALCOGEN

Hi All,

I am working on LAUNCHXL2-TMS57012 for CAN testing. I wanted to send message from CAN1 MSGBOX_1 to CAN2 MSGBOX_1. I have used the example code given in examples folder: ../HALCoGen/examples/example_canCommunication.c...

I did the exact same configuration in HALCoGen as shown in the above mentioned example code. still my code is stuck in below highlighted conditions -

canInit(); /* can1 -> can2 */
/* transmit on can1 */
canTransmit(canREG1, canMESSAGE_BOX1, tx_data);
/*... wait until message receive on can2 */
while(!canIsRxMessageArrived(canREG2, canMESSAGE_BOX1));
canGetData(canREG2, canMESSAGE_BOX1, rx_data); /* receive on can2 */
" Flag value is continously 0 from the function canIsRxMessageArrived".
NOTE - Everytime "canTransmit" function is returning Success(1).
Circuit Connection - with reference to "HerculesTm TMS570LS12x/RM46 LaunchPad User's Guide", I have connected J10.39 (DCAN1_TX) to J10.12 (DCAN2_RX). 
Kindly suggest if I am missing somthing. Any help would be highly appreciated.
  • Hi Yash,

    Did you establish the CAN network between CAN1 and CAN2?

    And launchpad's doesn't have CAN transceivers, right? how you established CAN bus communication between CAN1 and CAN2? At the controller the CAN lines are Tx and Rx only not differential lines, so we have to use external CAN transceivers to convert them into differential CAN bus signals like CAN_H and CAN_L.

    --

    Thanks & Regards,
    Jagadish.

  • Hi Jagadish,

    Thanks for you reply !!

    I have not established CAN network between CAN1 and CAN2, and launchpad doesn't have CAN Tranceivers. I have just connected CAN1 Tx to CAN2 Rx and thought it would work.

    Kindly correct me if I am wrong - To TEST this I need total 2 transceivers. One for CAN1_Tx and CAN1_Rx to convert it into CAN_H and CAN_L. then these CAN_H and CAN_L signals will be given to CAN_H and CAN_L of Second Transceiver. After that we need to give CAN_Tx and CAN_Rx of 2nd transceiver to CAN2_Tx and CAN2_Rx. 

    Right ?

  • Hi Yash,

    I tested without transceivers and found it is not working.

    Only two transceivers are fine, one for CAN1 signals and other for CAN2 signals, like shown in below pic

    For more details refer design files in below HDK board link

    TMDS570LS12HDK Development kit | TI.com

    --

    Thanks & Regards,
    Jagadish.