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.

LAUNCHXL-F280049C: use CANA and CANB together, CANA will have error

Part Number: LAUNCHXL-F280049C

Hi expert,

My customer need to use 2 CAN modules on F280049, but they will meet data change occasionally.

They use CANA continues send 0101010101010101, and I just use PC send data 0202020202020202 to CANB 1000 times, the interval is 10ms. The data rate are both 500kbps.

However, there is a high rate that the data send by C2000 CANA is changed, I record CAN analyzer's data, which can support 2 CAN.

Channel 0 (PC) <--> CANA (GPIO32 GPIO33) via the CAN transceiver on F280049 Launchpad.

Channel 1 (PC) <--> CANB(GPIO58 GPIO59) via the CAN transceiver on another board.

And the analysis is below, also attached the recorded excel.HYNN1.xlsx

You can see channel 0 received data is changed by channel1 sent data.

But there is no error both for the CANA and CANB register.

I can send the data I test by email if you need it. It is easy to reproduce.

I also changed the bit time, but will also reproduce the same error.

    CAN_setBitRate(CANABSEADDR, 100000000, 500000,10);
//    CAN_setBitRate(CANABSEADDR, 100000000, 500000,20);
    /* CAN B*/
//	CAN_setBitRate(CANBBSEADDR, 100000000, 500000,20);
	CAN_setBitRate(CANBBSEADDR, 100000000, 500000,10);

Could you kindly point out the reason why would this happen?

BR

Emma

 

  • Hi Emma,

    With CANA in transmission mode at all times and CANB just receiving, should the CAN analyzer be looking at TX data for channel 0 (CANA) and RX data for channel 1(CANB)?  I'm a bit confused with the attached diagram.  It seems like the channels are switched?

    Thanks,

    Joseph

  • Hi Joseph,

    thanks for your reply.

    Indeed, CANB also send data to PC, I just send data from PC for test.

    Joseph Casuga said:
    It seems like the channels are switched?

    Customer and I also confused at this, why CANB received data will influence CAN sent data?

    Can the RAM or FIFO overlapped of CANA and CANB?

    I will send the testing code to you by email.

    BR

    Emma

  • Hi Emma,

    Here is what i understand the intention and the setup is for the test:

        - CANA is always transmitting.  In this case, data sent is always 0101010101010101.  CANA conneced to ch0 of CAN analyzer

        - PC is transmitting and receiving.  In this case data sent is always  0202020202020202.

        - CANB is is just receiving.  CANB connected to ch1 of CAN analyzer

    All three nodes (CANA, CANB and PC/CAN analyzer) are connected through CANBUS.  Can you confirm if this is correct?

    If this is indeed the intent and if the testcases are written properly then CANB should not be sending any data.  I had trouble with the link you sent and i got the error message that file is not found.  Can you please send me the CAN testcase that is running on the F280049?

    Thanks.

    Joseph

  • hi Joseph,

     thanks for your kindly help.

    your understand is correct. and I have disabled the CAN TX function. You can find these code in the function

    void SlaveCan_sEncodeCanTxData(Uint16 uiSendLen)

    //		uiMailBoxCnt++;
    //		uiMailBoxCnt = uiMailBoxCnt%6;//¶ÔÖÐλ»úÐèÒªµÄÓÊÏä¹ý¶à£¬Ö»ÄÜÕâÑù·ÖÅäÁË
    //        CANMessageSet(CANAASEADDR,uiLoopCnt+11,&TXCANMessage_SlaveCan,MSG_OBJ_TYPE_TX);
    //        CANMessageSet(CANAASEADDR,uiLoopCnt+11,&TXCANMessage_SlaveCan,MSG_OBJ_TYPE_TX);
    //        CANMessageSet(CANBBSEADDR,uiLoopCnt+27,&TXCANMessage_SlaveCan,MSG_OBJ_TYPE_TX);

    still similiar issue.

    could you tell me why this happend.

    BR

    Emma

  • Hi Joseph

    Any update?

    BR

    Emma