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: MCAN Interrupt 0 and 1

Part Number: TCAN4550-Q1
Other Parts Discussed in Thread: TCAN4550

Hello,

I am working on TMS570+TCAN4550. It works in polling mode now, and I want to use the interrupt mode for RX. I configured GPIO1 and GPIO2 as MCAN_INT 1 and MCAN_INT 0, and connect those two GPIO signals to 2 GPIO pins of TMS570 which support the external input interrupt. My questions are:

1. the difference between MCAN INT 0 and MCAN INT 1

2. Is the INT0/1 level trigger or edge trigger? If it is edge trigger, which edge (rising, or falling)?

  • Hi QJ,

    INT0 and INT1 are just two available interrupt lines. You can select for each interrupt flag whether it should be reported via INT0 or INT1. When these are output via the GPIO pins, they are active low (i.e., a low state is latched whenever the enabled interrupt condition occurs).

    Please let me know if this isn't clear.

    Best regards,
    Max
  • Thanks Max.

    I can transmit and receiver CAN-FD packets in polling mode without any problem, but I could not get the RX interrupt.

    I configured GPIO1 for MCAN_INT1, and GPIO2 for MCAN_INT0. The GPIO1 and GPIO2 are connected to 2 GPIO pins of TMS570 MCU. The MCU GPIO interrupt is also enabled, and GIO ISR is to read the CAN data from TCAN45x RX FIFO.

    The both interrupt line 0 and line 1 are enabled.
    The interrupt line 0 is used for RF0NL, and interrupt line 1 is for RF1NL.

    The CAN-FD analyzer transmits data to TCAN45x, and waveform on scope looks good, the I could not get the RX interrupt.
  • QJ,

    So you are not seeing the interrupt happen at all on the GPIO pins, is this correct?

    First, I want to verify that all the correct steps were taken to configure GPIO1 and GPO2 for the RX FIFO New Message Interrupt. I'm sure you went through all of them, but it's good to check.

    1. Configure GPIO1 as MCAN_INT 1. It is this by default, but just in case, you set bits 11:10 in register h'0800 to b'01.
    2. Configure GPO2 as MCAN_INT 0. Set bits 23:22 in register h'0800 to b'01.
    3. Enable MCAN_INT 0 and MCAN_INT 1 by setting bits 1:0 in register h'105C both to 1.
    4. Enable RX FIFO New Message Interrupts 0 and 1 by setting bits 4 and 0 in register h'1054 both to 1.
    5. Assign RF0NL to MCAN_INT 0 by setting bit 0 in register h'1058 to 0 (it is this by default).
    6. Assign RF1NL to MCAN_INT 1 by setting bit 4 in register h'1058 to 1.

    If you have done all of these steps correctly, then I will ask that you probe the GPIO pins to verify that nothing is happening.

    Let me know once you have taken both of these steps, and we can continue with the investigation.

    Regards,
  • Thanks Eirc,

    I did all of these steps you listed. I will probe the GPIO pins later.
  • Hi QJ,

    Just wanted to check in - have you had a chance to check the GPIO lines?

    Thanks,
    Max