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.

TMS570LC4357: Message is not receiving through PCAN

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Hey TI support,

I am trying to receive standard CAN data using PCAN but I am unable to do so. I am using canGetData for it. I have done all the required changes in halcogen file as instructed in the example file. I even tried running the example code in CCS but receive function is not working. Though the transmit is working(canTransmit).

  • Hi Sarthak,

    Before reading the data from CAN mailbox, you need to check to see if the Rx message box has pending Rx data:

    while(!canIsRxMessageArrived(canREG1, canMESSAGE_BOX1));
    canGetData(canREG1, canMESSAGE_BOX1, rx_ptr); 

    To make CAN bus work, a CAN transceiver is needed for each CAN node. The role of the CAN transceiver is to drive and detect data to and from the CAN bus. It converts the single-ended logic used by the CAN controller to the differential signal transmitted over the bus. It also determines the bus logic state from the differential voltage, rejects the common-mode noise, and outputs a single-ended logic signal to the controller. The P-CAN USB Pro has built-in CAN transceiver. Is there CAN transceiver on your board for TMS570 CAN signals?

    If there is a transceiver on your board, does the message object or mailbox has the same message ID as the incoming message from P-CAN?

  • Hello I am also using pCANVIEW software and I am getting error as Passive error.

  • Hi Sahil,

    Is there CAN transceiver on your board for TMS570 CAN signals?

    If there is a transceiver on your board, does the message object or mailbox has the same message ID as the incoming message from P-CAN?

  • The problem has been partially solved. I have used canBitRate = CANBitRateSet(CANB_BASE, 200000000, 500000); this function in my code but the transmission and reception is happening at 250k bit rate in PCANVIEW software. 

  • The problem has been solved by commenting out the internal loopback.