AnsweredAssumed Answered

CAN TX, RX interrupt not working!

Question asked by draz.raz on Mar 29, 2012
Latest reply on Mar 29, 2012 by Clive One
Hello,
I'm trying to get the CAN Example (http://www.keil.com/download/docs/351.asp) to work properly, but I have problems with the RX and TX interrupts.

When the message was sent and is pending in receive FIFO0, the NVIC sets TX and RX interrupt to "pending", but it doesnt execute them.

/*----------------------------------------------------------------------------
  CAN transmit interrupt handler
 *----------------------------------------------------------------------------*/
void USB_HP_CAN_TX_IRQHandler (void) {
 
  if (CAN->TSR & CAN_TSR_RQCP0) {                 // request completed mbx 0
    CAN->TSR |= CAN_TSR_RQCP0;                    // reset request complete mbx 0
    CAN->IER &= ~CAN_IER_TMEIE;                   // disable  TME interrupt
     
    CAN_TxRdy = 1;
  }
}
 
/*----------------------------------------------------------------------------
  CAN receive interrupt handler
 *----------------------------------------------------------------------------*/
void USB_LP_CAN_RX0_IRQHandler (void) {
 
  if (CAN->RF0R & CAN_RF0R_FMP0) {                // message pending ?
    CAN_rdMsg (&CAN_RxMsg);                       // read the message
 
    CAN_RxRdy = 1;                                // set receive flag
  }
}

Any help welcome!
regards,
raz draz

Outcomes