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: CAN Interrupt

Part Number: TMS320F28379D


Tool/software:

Hello,

In my application, I route few mail boxes receiving interrupts on Line 0. 

But today I want to add the Error interrput.

Checking the INT0ID register, I thought I was able to distinguish the two sources of interrupt. Bit I am not sure to understand the reference manual:

Does the value 0x8000 indicate that the source is a status or error but BusOff (I am also not sure that 0x7 means BusOff), or that we can only be sure that the source is not a BusOff.

In other words, shall I check if INT0ID==0x8000 or if IT0ID==0000 ?

Thank you

  • The DCAN provides three groups of interrupt sources: Message Object Interrupts, Status Change Interrupts and Error Interrupts. The source of an interrupt can be determined by the interrupt identifiers Int0ID / Int1ID in the Interrupt Register.

    Does the value 0x8000 indicate that the source is a status or error but BusOff (I am also not sure that 0x7 means BusOff), or that we can only be sure that the source is not a BusOff.

    The value 0x8000 in the Int0ID field indicates that an interrupt is pending because the CAN Core has updated the Error and Status Register (Error Interrupt or Status Interrupt). This interrupt has the highest priority. 

    0x7 means No CAN bus event was detected since the last time when CPU has read the Error and Status Register. Any

    In other words, shall I check if INT0ID==0x8000 or if IT0ID==0000 ?

    Yes, you need to check INT0ID ti know if there is any error. 

    Error interrupts can only be routed to interrupt line DCAN0INT that has to be enabled by setting IE0 in the CAN Control Register