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.

AM335x dcanTxRx example - Wrong msg invalidation code

Hi,

AM335X_StarterWare_02_00_00_07, dcanTxRx exampl has the following code:

    index = CAN_NUM_OF_MSG_OBJS;
    while(index--)
    {
        /* Invalidate all message objects in the message RAM */
        CANInValidateMsgObject(SOC_DCAN_1_REGS, index, DCAN_IF2_REG);
    }

This effectively invalidates messages with indexes 63..0. But according to AM335x TRM the IFx registers receive message index in 1..64 range.

Do I miss something or there is a bug here (in code or TRM)?

Best,
Vasili

  • Hi Vasili,

    You are right. This is a bug in the code. Thanks for bringing this to our notice.

    An IR has been raised with number SDOCM00103735 and this shall be fixed in the next release.

    To rectify the bug the code will be as -

    index = CAN_NUM_OF_MSG_OBJS;
    while(index)

    {
        /* Invalidate all message objects in the message RAM */
        CANInValidateMsgObject(SOC_DCAN_1_REGS, index, DCAN_IF2_REG);

        index--;
    }