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.

CAN MessageId not updating

Dear Sir/Madam,

I am new to this RM48 hercules Microcontroller. I started playing with the USB development kit that you have. All my codes are working except the CAN module. I am interfacing this board over a CAN bus and is connected to other can nodes. My transmit is ok and even on reception i am able to get the data from the bus. But I am unable to fetch the extended message identifier from IF2ARB register. That register is not updating its value even after reception of can packet having different message ID. I am attaching my project please have a look at it and tell me the bug.

Regards,

Sourav.

  • Hi Sourav,

                 Thanks for your post. We will look into this and get back to you. 

    Best Regards,
    Shelford

  • Hi Sourav,

           Sorry for the late reply. Maybe you have a misunderstanding of the CAN message ID. Before you do a transmission, you need to define the message identifier of transfer side and receive side.  The receiver with the same ID will get the data when the transmitter send data to the Bus with a defined ID. So the receiver ID register won't update after a receiving. Thanks.

    Best Regards,

    Shelford

  • Hi Shelford,

               I got your point, but there is also a mask to be set for the register so as to receive the set of messages for a particular message buffer. How shall i specifically know  which message identifier has come. This is necessary for our design, as in  CAN you do not have addresses. Is there any way where i can get the raw CAN message, i mean the full fields.


    Regards,

    Sourav.

  • Hi Shelford,

    I solved my problem, the arbitration field cannot be one time settable, then the whole purpose of the CAN is defeated. There is a bit in Interface command register where you can set auto update of arbitration field. On setting that bit the problem is solved and i am getting the message id from various can nodes with proper masking. You can consider this thread to be closed.

    Regards,

    Sourav