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.

TMS320F28P559SJ-Q1: CAN id not align with the target ID using drivelib example: mcan_ex10_receive_multiple_buffers

Part Number: TMS320F28P559SJ-Q1

Tool/software:

Hi Expert

Customer test our drivelib demo: mcan_ex10_receive_multiple_buffers for CAN test, it can run properly and receive the right CAN message, but CAN id do not match the setting, is there some where need to pay attention in ccs setting?

Thanks

joe

  • Hi Joe,

    Not sure what customer meant by CAN ID not matching the setting.  Please get some clarification on this.  The CAN example mcan_ex10_receive_multiple_buffers has set up the message filters so that message IDs 0x123, 0x124, 0x125, and 0x126 data are stored in the message buffer.  If customer needs to modify the setup of message IDs that should be received, this can be done in MCANConfig() function.  Message IDs can be modified by altering these entries in the function:

        //
        // Configure Standard ID filter element 0
        //
        stdFiltelem.sfid2              = 0x0U; // Standard Filter ID 2.
        stdFiltelem.sfid1              = 0x123U; // Standard Filter ID 1.
    
        MCAN_addStdMsgIDFilter(MCANA_DRIVER_BASE, 0U, &stdFiltelem);
    
        //
        // Configure Standard ID filter element 1
        //
        stdFiltelem.sfid2              = 0x1U; // Standard Filter ID 2.
        stdFiltelem.sfid1              = 0x124U; // Standard Filter ID 1.
    
        MCAN_addStdMsgIDFilter(MCANA_DRIVER_BASE, 1U, &stdFiltelem);
    
        //
        // Configure Standard ID filter element 2
        //
        stdFiltelem.sfid2              = 0x2U; // Standard Filter ID 2.
        stdFiltelem.sfid1              = 0x125U; // Standard Filter ID 1.
    
        MCAN_addStdMsgIDFilter(MCANA_DRIVER_BASE, 2U, &stdFiltelem);
    
        //
        // Configure Standard ID filter element 3
        //
        stdFiltelem.sfid2              = 0x3U; // Standard Filter ID 2.
        stdFiltelem.sfid1              = 0x126U; // Standard Filter ID 1.
    
        MCAN_addStdMsgIDFilter(MCANA_DRIVER_BASE, 3U, &stdFiltelem);
    

    Best regards,

    Joseph