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-Q1: priority setting problems

Part Number: TCAN4550-Q1


Hi Team,

There're two confusions from my customer, and need your advice. Thanks.

1. How to set the priority in 4.2.5 in http://www.ti.com/lit/ug/sllu270/sllu270.pdf, does it means customer can set any messages as the high priority?

2. When using Standard ID Filter, does it means customer can set several IDs in MRAM to make a filter after received messages? If does, how to write the IDs?

  • Lucas,

    Thanks for bringing these questions to E2E.

    1. The priority is based on the assigned ID of each CAN node, with the highest possible priority being all dominant bits (all 0's) and the lowest priority being all recessive bits (all 1's). Priority is determined during the arbitration phase of the CAN frame (before data portion) where all CAN nodes transmit their ID at the same time and are monitoring the CAN bus to see if the ID they are transmitting is the same as the CAN bus data. Due to the wired-AND approach to the CAN bus, when dominant bits are transmitted on the CAN bus, this 'overwrites' any recessive bits since the dominant signal is a driven differential voltage to the bus. Thus, when a node is transmitting its ID, and recognizes a dominant bit in the ID when it is transmitting a recessive bit, it halts transmitting for the duration of that frame because the mismatch indicates to the controller that there is a higher priority node on the bus attempting to transmit information. So, the priority assignment is based in the ID of the CAN node.
    2. Yes, the way this works is by configuring the amount of filter elements, and then the start address for the filter. Both of these are configured in register 0x1084, where the amount of standard ID elements is limited to 128. Once this is set, the filter elements can each be written to the MRAM at the configured starting address using the filter element structure that can be found in the MCAN specification (found here on page 52). It's the same as writing messages to TX FIFO, except you're configuring the memory for filter elements instead. The messages that come in will be checked against all filter elements starting at the first configured element in the MRAM, until it finds one it matches, then it will perform whatever action is configured by that filter element. If the message does not match any of the filters, then the controller will handle the message however it is configured by the Global Filter register (register 0x1080).

    Please let me know if you have any other questions. I know in both answers there is a lot of information, so if you or the customer needs any more background information, don't hesitate to ask.

    Regards,

  • Thanks for your quick respond, Eric.

    Could it be possible to filter the specific data from the CAN bus, for example, the customer just need 0x111, 0x333, 0x666 data from the CAN bus with 0x000~0x7FF?

  • Lucas,

    Are you referring to the data portion of the CAN frame? There are no built-in features to filter messages based on the data portion of the CAN frame, only filters and masks that can be configured to accept or reject messages based on the ID field of the CAN frame.

    Does this make sense?

    Regards,