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.

TCAN4550: CANFD Watermark Use Case

Part Number: TCAN4550

Hi,

What is the exact use of watermark in RXFIFO 0. Currently we are setting it as 25.

When should we set watermark as 1 and when should we set watermark as 32. Is there any specific scenario or setting WM as 25 is fine for all conditions?

Regards,

Akshay Naik

  • Hi Akshay,

    The watermark is an optional feature that can be used or not depending on your preference.  If it is used, it can be used in a couple different ways.

    One common use is to interrupt the MCU to read messages when a specific number of messages has been received which is set to the watermark level.  This is commonly used to free up the processor from interrupting the normal routine for every single message.  Instead it allows the processor to read and process several messages at a time.  You would need to determine the level of the watermark based on how frequently you want to respond, and at a level low enough to allow the processor time to read and clear enough messages in the RX FIFO to prevent an overflow situation.  You would need to take into account the frequency of the messages and how long the processor takes to clear them from the FIFO.

    Another common use is more of a failsafe indicator that the RX FIFO is almost full and requires immediate attention by the processor.  Once again, the level would be your preference based on your system needs.

    This simply is a question of how you want to structure and use your processor's Interrupt Service Routine.  You are not required to use the watermark, or set it to a particular level, but it is an optional feature that is available to you.

    When used, I have typically seen a watermark level set between 50% and 60% of the FIFO size.  But again, it is your preference as to if and how you want to use the watermark and what level is best suited for your application.

    Regards,

    Jonathan