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.

C2000WARE: C2000WARE

Part Number: C2000WARE


Tool/software:

C2000WARE: CAN Message Objects Configuration

I am trying to set CAN Message object Configuration with following arguments in API and getting rxMsgData correctly.

But if I with different Identifier I am not able to get rxMsgData as shown below.

Can anyone tell me what could be the reason, OR what should I set in API ?

  • Hi Rahul,

    The parameter you are changing is not the identifier but instead it is the mask to the identifier.  For more understanding on mask ID or message filtering, please check example can_ex8_mask.  This example illustrates the use of Message Identifier and Message ID Mask.

    Best regards,

    Joseph

  • Hi Joseph,

    Thank you for the reply.

    Example can_ex8_mask explain when a frame with a matching filter criterion is received, the data will be copied in mailbox 1. 

    But I do not want to set this filter matching criteria. I want to receive data with any frames and ID. 

    Is any examples gives above solution OR what arguments can be pass in CAN_setupMessageObject ()?

    Regards,

    Tushar

  • Hi Rahul,

    But I do not want to set this filter matching criteria. I want to receive data with any frames and ID. 

    JC:  This is exactly what the message filtering is for.  To accomplish this, set all the corresponding mask bits to '0' so all frames will be received.

    Regards,

    Joseph

  • Hi Joseph,

    After setting below object I am able to receive all frames ID and its data.

    CAN_setupMessageObject(CANA_BASE, RX_MSG_OBJ_ID, 0xFFFFFFFF,
    CAN_MSG_FRAME_STD, CAN_MSG_OBJ_TYPE_RX, 0x00000000,
    (CAN_MSG_OBJ_RX_INT_ENABLE | CAN_MSG_OBJ_USE_ID_FILTER), MSG_DATA_LENGTH);

    Regards,

    Tushar