Other Parts Discussed in Thread: LAUNCHXL-F28379D, C2000WARE
Dear support,
I'm trying to transmit/receive CAN messages on my LAUNCHXL-F28379D evaluation board.
Have no problems with transmit, but fail to receive any message.
I'm sending a message to the board and getting the interrupt.
After that I read the value of the CAN_INT register (addr = 0x10) and the value I get there is 0x8000. (I expected to read here the mailbox number instead of 0x8000)
After getting 0x8000, I read the status register (addr = 0x04), and see the value 0x10 means RX_OK.
I configured only one rx mailbox (6), but I see no data in that mailbox. (trying to read the message with: CANMessageGet(CANB_BASE, 6, &sRXCANMessage, true);)
The RX MB configured in that way:
CanMailboxConfig(RECEIVE_MAILBOX,6,(Uint32)MbxHeaderId.all,SET_OVERWRITE_PROTECT_CONTROL,ENABLE_MAILBOX_INTERRUPT,0x00001e00); void CanMailboxConfig(Bool bDir, Uint16 uiMBNunmer, Uint32 uiMSGID,Bool bOPC,Bool bEnableInt, Uint32 uiMaskID) { if( uiMBNunmer > MAILBOX_NUM_31 ) { return; } switch (bDir) { case RECEIVE_MAILBOX: *(unsigned long *)ucRXMsgData = 0; sRXCANMessage.ui32MsgID = uiMSGID; // CAN message ID - use 1 sRXCANMessage.ui32MsgIDMask = uiMaskID; // no mask needed for TX sRXCANMessage.ui32Flags = MSG_OBJ_RX_INT_ENABLE | MSG_OBJ_EXTENDED_ID | MSG_OBJ_USE_ID_FILTER; //MSG_OBJ_FIFO|MSG_OBJ_RX_INT_ENABLE | MSG_OBJ_EXTENDED_ID; // Use Extended message sRXCANMessage.ui32MsgLen = sizeof(ucRXMsgData); // The message size is between 0 - 8 bytes sRXCANMessage.pucMsgData = (unsigned char *)ucRXMsgData; // ptr to message content // Setup the message object being used to receive messages CANMessageSet(CANB_BASE, uiMBNunmer, &sRXCANMessage, MSG_OBJ_TYPE_RX); break; . . .
Please advise.
Alex.