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.

TMS320F28379D: Regarding to IF1 and IF2 registers in CAN module

Part Number: TMS320F28379D

Sir,

I don't understand the relation of these two registers. because in the bit-field example in c2000 ware , the Tx and Rx message  objects configured with IF1 registers. But while receiving we use IF2 register. Why?

Please explain this thing to me how the configuration is co-relate between them.

Ashutosh  

  • Due to holidays, you can expect a response in the first week of Jan 2020

  • Interface registers are just a "set" of registers used to trasfer data between cpu and CAN core. If your logic is just polling TX/RX flags you can use just IF1 or IF2 without any issue. Same is true if both TX and RX are handled by interrupts. By using two different interface registers, one set for background TX and another one for RX interrupt you can eliminate race conditions without disabling interrupts. You don't want RX interrupt to over-write an ongoing TX or configuration settings in an IFx.

    Note that there are multiple registers/fields values are set (not one atomic rd/wr) before the transfer is initiated and multiples values are returned by the core after "few" cycles.

  • Hi Ashutosh,

    In the examples IF1 is generally used for transmit objects and IF2 are for received objects.  You can use IF1/2 for transmitting or receiving, there is no restriction for these.

    Regards,

    Joseph

  • Hi Ashutosh,

    Hope my latest response answered your question.  I'm marking this thread closed, but if you still have questions regarding the IF1/IF2 registers, please post it in the forum.

    Regards,

    Joseph