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.

AM2634: MCAN RX FIFO element Configuration

Part Number: AM2634

Hi TI Expert,

In MCAN message RAM configuration that has been configured to have two RX FIFO message elements, is it possible to have the elements dedicated to a particular CAN ID receive?
if yes, could you please tell me how to configure this?

I am facing an issue where even when I send only one message, this message is filled up in both the RX FIFO elements. And when I send two different messages, only one message gets filled in both the RX FIFO elements and I don't receive the other message.

Thanks!

  • Hi Sue,

    Can you post the configuration in question and how the CAN data is being received too?

    Have you referenced our provided SDK examples for MCAN yet? I'd like to know what you did the same or different compared to that.

    Best Regards,

    Ralph Jacobi

  • Hi Ralph,

    Thanks for your response.
    My configuration is similar to 'MCAN Loopback Polling' example from SDK. I also ran this example on the development board where I disabled the internal loopback mode and only sent one message (with ID "0xD0U") from CAN tool and saw that message "0xD0U" filling up all the five RX FIFO elements in the MCAN message RAM.
    How to configure the driver so that each RX FIFO element is dedicated to only one CAN message ID and does not end up filling all the RX FIFO elements?

    Thanks!

  • Hello Sue,

    I tried to dig into this some today but I will need to get one of our software experts to help further. This is a holiday weekend however so please expect a response early next week.

    Thanks for highlighting that this can be created from the SDK example and how you did so, that should enable quicker reproduction and debug of what you are observing.

    Best Regards,

    Ralph Jacobi

  • No problem. I will wait for your response. Thanks!

  • Hi Ralph, do you have any update on this query? Thanks!

  • Hi Sue,

    Thanks for the follow up, I don't have an immediate update but I will circle back with our teams on this topic.

    Best Regards,

    Ralph Jacobi

  • Hi Sue,
    Will it be possible for you to share the MCAN Loopback Polling example that you modified? It will help me understand the problem easier.

    Best,
    Aswathi

  • Hi Aswathi,

    I ran the example almost as-is and sent only only message from CAN tool instead of five to see how the message is getting stored in RX FIFO elements in MCAN RAM memory. I have attached my example code file here.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /*
    * Copyright (C) 2021 Texas Instruments Incorporated
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *
    * Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    *
    * Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in the
    * documentation and/or other materials provided with the
    * distribution.
    *
    * Neither the name of Texas Instruments Incorporated nor the names of
    * its contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    *
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hello! Any update on this?

  • Hi Sue, apologies for the delay, we had a couple of holidays here.

    I have gone through the application, what I am understanding is you have disabled the internal loopback mode and are trying to receive and transmit the frames externally. But I don't understand why you have disabled Tx and Rx completion polling. I am assuming it was done only for debugging purposes, will that be right?

    The issue you mentioned was that the same message 0xD0 was getting filled in all 5 FIFO indexes, and the next message is not being written into the FIFO.
    But I have tried the program from my side, and I am unable to reproduce this issue. It is working as expected.

    The initial FIFO state is all params = zeroes.

    Now when I send 0xD0, it is being placed in FIFO Lvl 1, and putIndex updated to '1':

    After sending the second message 0xD1:

    Can you check if you are sending the messages in correct order? For simplicity you can update the macro APP_MCAN_MSG_LOOP_COUNT from 10U to 1U, so that you have to send the messages only for one iteration.

    Best,
    Aswathi