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.

CCS/TMS320F28377S: 28377s, CAN Communication, CAN Receive, CAN Transmit

Part Number: TMS320F28377S


Tool/software: Code Composer Studio

Hello everyone.

We are currently building a system using the 28377S.

The 28335 and 28377S are so different because of the CAN communication.

28377S In the case of CAN communication, if multiple IDs are transmitted at the same time, ID transferred later may become Ignore.

To solve this problem, use Delay_us () to delay the code as shown below.

Using Delay is fine, but it seems to be systemically unstable, so I'm looking for another way.

I would like to receive the status value of the current status of CAN communication and wait for the transmission and transmit the next ID. Do you have any other commands?

We are creating and using ECanaMbox for use similar to the 28335 system.

Thank you for your reply.

void CANA_Transmit_Func(void)
{

    unsigned char i =0;

    for(i=0;i<=32;i++)
    {
        if(ECanaRegs.CANTRS[i].bit.TRS == 1)
        {
            ECanaRegs.CANTRS[i].bit.TRS = 0;

            CANA_sTXCANMessage.ui32MsgID = ECanaMboxes.MBOX[i].MSGID.all;
            CANA_sTXCANMessage.ui32MsgIDMask = 0;
            CANA_sTXCANMessage.ui32Flags = 0;
            CANA_sTXCANMessage.ui32MsgLen = 8;
            CANA_txMsgData[0] = ECanaMboxes.MBOX[i].MDL.byte.BYTE0;
            CANA_txMsgData[1] = ECanaMboxes.MBOX[i].MDL.byte.BYTE1;
            CANA_txMsgData[2] = ECanaMboxes.MBOX[i].MDL.byte.BYTE2;
            CANA_txMsgData[3] = ECanaMboxes.MBOX[i].MDL.byte.BYTE3;
            CANA_txMsgData[4] = ECanaMboxes.MBOX[i].MDH.byte.BYTE4;
            CANA_txMsgData[5] = ECanaMboxes.MBOX[i].MDH.byte.BYTE5;
            CANA_txMsgData[6] = ECanaMboxes.MBOX[i].MDH.byte.BYTE6;
            CANA_txMsgData[7] = ECanaMboxes.MBOX[i].MDH.byte.BYTE7;

            CANA_sTXCANMessage.pucMsgData = CANA_txMsgData;
            CANMessageSet(CANA_BASE, TX_MSG_OBJ_ID, &CANA_sTXCANMessage,MSG_OBJ_TYPE_TX);
            CANA_status = CANIntStatus(CANA_BASE, CAN_INT_STS_CAUSE);

             DELAY_US(300);

        }
    }


}