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: TCAN4550 Device interrupt configuration problem

Part Number: TCAN4550

Hello all,

I am trying to configure the interrupts for my TCAN device. Currently, my program only performs the configuration for the TCAN (the Init_TCAN function provided in the demo code). I am realizing that after running the code, after some time, the CANTO interrupt is set and the blue LED on the TCAN BOOST module is lit. I want to try and configure it so that the CANTO interrupt is ignored. I am using the following code to accomplish this.

TCAN4x5x_Device_Interrupt_Enable dev_ie = {0}; // Initialize to 0 to all bits are set to 0.
dev_ie.CANTOEN = 1;
CHECK_AND_HANDLE_ERROR(TCAN4x5x_Device_ConfigureInterruptEnable(&hspi2, &dev_ie));	  // Disable all non-MCAN related interrupts for simplicity
  

Is this the correct way to configure the interrupt register? Even though its simple, I want to make sure I am understanding correctly so that we don't run into issues later in development.

Thank you

 

  • Hi Nivant,

    The demo code's CANTO (CAN Timeout) is the CANSLNT  (CAN Silent) bit in the Interrupt Registers.  This bit indicates that there has been no CAN activity for approximately 1 second which could indicate an error such as a broken wiring harness. 

    There is not a way to prevent this bit getting set in register 0x0820 when you read the register through SPI.  However, you can "mask" or prevent it from causing a state change on the nINT pin.  This is done by setting the CANSLNT bit in the Interrupt Enables register (0x0830[10]) to "0". 

    By default all interrupts are enabled and have a bit value of "1", so you will need to disable any interrupts you don't want reflected on the nINT pin by writing a "0" to the corresponding bit in register 0x0830.

    By writing "dev_ie.CANTOEN = 1;" you are actually enabling the CANTO bit to be reflected on the nINT pin, while the demo code has otherwise disabled all the other interrupts.

    So you will need to set CANTOEN = 0 instead.

    Regards,

    Jonathan