This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem using multiple interrupts

I have a problem when using a KitCON C167 boards. This problem is described as follows. When using two interrupts: [1] generated externally by an arrival of a CAN message, and [2] generated from an on-chip timer, it seems that the second interrupt (timer-based) does not occur. Note that when I used two timer interrupts this problem did not exist. Only when a timer interrupt is used along with the CAN interrupt, the problem stands. What could be the reason of this? and any suggestions for solving it?

Thanks a lot,
Mouaaz.

Parents Reply Children
  • Both interrupts are enabled and are on different levels and above level zero. You also have the timer with a higher priority than the CAN. Given the information so far, I don't see a problem.

    You example only starts the timer within the CAN interrupt. Have you confirmed that you would get a timer interrupt within the CAN interrupt? Did you just try to set the timer interrupt request flag to see if you vector?

    Example:

    CAN_ISR() {
      Tx_IR = 1; /* set the interrupt request flag on the timer */
    }
    
    I would need to see more of the code sequence that leads to the scenario you described to be able to comment further.