Part Number: TMS320F280049C
Dear team:
A customer of mine has two questions when using the DCAN module. I hope you can help answer them:
1, In the CAN loopback routine, When the CAN_setupMessageObject function is initialized, the code initialization of the sending and receiving parts is for the IF1 register. But when the message is received, the IF2 register is called. Can the IF2 register be called without initialization?
Can initialization:
CAN_setupMessageObject(CANA_BASE, 1, 0x18102701, CAN_MSG_FRAME_EXT, CAN_MSG_OBJ_TYPE_TX, 0x0, CAN_MSG_OBJ_NO_FLAGS , MSG_DATA_LENGTH); // Initialize the receive message object used for receiving CAN messages. // Message Object Parameters: // Message Object ID Number: 2 // Message Identifier: 0x1234 // Message Frame: Standard // Message Type: Receive // Message ID Mask: 0x0 // Message Object Flags: None // Message Data Length: 2 Bytes CAN_setupMessageObject(CANA_BASE, 2, 0x18222701, CAN_MSG_FRAME_EXT, CAN_MSG_OBJ_TYPE_RX, 0x1FF0FFFF, CAN_MSG_OBJ_USE_EXT_FILTER, MSG_DATA_LENGTH);
CAN read:
CAN_readMessage(uint32_t base, uint32_t objID,
uint16_t *msgData)
{
bool status;
uint16_t msgCtrl = 0U;
ASSERT(CAN_isBaseValid(base));
ASSERT((objID <= 32U) && (objID != 0U));
HWREG_BP(base + CAN_O_IF2CMD) =((uint32_t)CAN_IF2CMD_DATA_A |
(uint32_t)CAN_IF2CMD_DATA_B |(uint32_t)CAN_IF2CMD_CONTROL |
(objID & CAN_IF2CMD_MSG_NUM_M) |(uint32_t)CAN_IF2CMD_ARB);
//
2, Customers want to use CAN mask filtering function, If set in the CAN_setupMessageObject function:
①Message ID Mask: 0x0. Is this situation equivalent to turning off the filtering function?
②Message ID Mask: FFFFFFFF. Shouldn't it receive anything?
Best regards