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.

F280049 can_ex3_external_transmit 中斷問題



我想使用F280049C 開發版跟外接CAN做通訊。

// transmit message CAN Module: A
// Message Object ID Number: 1
// Message Identifier: 0x101
// Message Frame: Extended
// Message Type: Transmit
// Message ID Mask: 0x0
// Message Object Flags: CAN_MSG_OBJ_FIFO (0x00000002U)
// Message Data Length: 4 Bytes

我set CAN_setupMessageObject() 沒有設定 CAN_IF1MCTL_TXIE ,可是每當我傳送一次時,他都會進入canISR。

也檢查過寫入到 CAN_O_IF1MCTL,IF1MCTL 設定值是 0x00000004 也沒有設定到 Transmit Interrupt Enable。

HWREG_BP(base + CAN_O_IF1MCTL) = msgCtrl;  //   msgCtrl = 0x00000004;  

我只有set receive CAN 是設定 CAN_MSG_OBJ_RX_INT_ENABLE 而已,receive  CAN 是可以確定在canISR收到外接CAN。

但傳誦的CAN會進入中斷是有點奇怪事情。