How to configure the CAN module to prevent unnecessary message’s interrupt

by <a href=""><font color="#000000"><font size="2">Hero Employee</font></font> </a> yucheng on ‎01-22-2017 08:57 PM


Is it possible to configure the CAN module to prevent receiving unnecessary message’s interrupt?


The Bosch CAN module supports both 11-bit (standard) and 29-bit (extended) message identifiers. The UMask bit determines whether any of the mask bits (Msk28-0, MXtd, and MDir) are used for acceptance filtering, and the corresponding bit of Mask Registers should be set for 11-bit (standard) or 29-bit (extended) message identifiers. The MXtd and MDir bits indicate whether the Xtd and Dir bit are used for acceptance filtering.

However, after configuring the acceptance filtering, the CAN controller may receive some unmatched message’s interrupt if the SIE bit (Status Change Interrupt Enable) is enabled.

The SIE bit is used to disable/enable status change interrupt, if this bit be enabled, an interrupt will be generated when a message transfer is successfully completed or a CAN bus error is detected.

Status interrupts may be caused by:

  1. Transmission from the CAN modules (TxOK is set) is successful.
  2. Reception of a message on the CAN bus is successful independent of the result of acceptance filtering. IntId register indicate the number of matched message object which caused the interrupt, for the unmatched message, the IntId will be 0x0.
  3. An error on the CAN bus is detected 

Enable the SIE will cause the interrupt whenever a message be acknowledged in the CAN bus, and if the IE be set, the interrupt will line to the CPU.

If don’t need to monitor the CAN bus activity closely, this bit will not be recommended to set. And the CAN module will only generate the interrupt after receiving the message matched acceptance filtering.