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.

how to setup the Receive Interrupt of CAN module on TMS320F28377DPTPT?

Other Parts Discussed in Thread: TMS320F28377S

Recently,I debug the CAN module which now could communication in for(;;) loop on the basis of the code 《can_loopback》 on ControlSuit with TMS320F28377S,include receive and transfer data.However,I could not setup  the Receive Interrupt.

when I refer to 《can_can_loopback_interrupts》,It could work under test and exl mode,but not the normal mode,eventhough I check it out the GPIO pins。

//HWREG(CANA_BASE + CAN_O_CTL) |= CAN_CTL_TEST;
//HWREG(CANA_BASE + CAN_O_TEST) = CAN_TEST_EXL;

Can anyone help me to setup this Receive Interrupt in normal mode of CAN module on TMS320F28377?

I want to get out the Receive Interrupt but not Transfer Interupt and Err Interrupt,eg.CANIntEnable(CANA_BASE,CAN_INT_STATUS);// | CAN_INT_ERROR | CAN_INT_MASTER);

  • Please check the TRM 21.3.3 Test Modes. These two sentences cannot be commented out. The CAN module will send the signals to outside transceiver when the CAN module in DSP is set as External Loopback Mode. If you comment out these two sentences, the DSP doesn't know what mode it is set.
  • if not comment the test code:
    HWREG(CANA_BASE + CAN_O_CTL) |= CAN_CTL_TEST;
    HWREG(CANA_BASE + CAN_O_TEST) = CAN_TEST_EXL;
    however,the can module would be test mode as described in TRM 22.3.3.3,which TX pin not only could transfer data but also could receive data,while RX pin would be ignored.