Part Number: TMS320F28374S
Hi Expert,
There are 2 issues during customer development:
- Need CAN FIFO mode demo code: TI's F2837x TRM describes that the CAN message can be handled using data buffer, which is realized by the mailbox RAM reuse as CAN FIFO buffer, but I didn't find the demo code in SDK, is there any demo code to guide customer how to configure CAN to transmit data in FIFO buffer mode? this will improve customer CAN message handling effciency.
- the CAN BUSY bit cannot indicates the CAN messages transmission state:
customer uses the below code to transmit a batch of data, in the code the CAN "CAN_IF1CMD_BUSY" is polled to check whether the CAN is free and the next CAN Frame can be sent, but the test result is, even the "CAN_IF1CMD_BUSY" bit is cleared, the extra delay is still needed for a correct CAN message frame transmission, without the time delay the next CAN Frame cannot be sent correctly.
uint16_t CanTransmit(CanFrame* canFrame)
{
g_transmitTestCnt++;
// Polling can busy bit
if (((CanaRegs.CAN_IF1CMD.all) & CAN_IF1CMD_BUSY) != CAN_IF1CMD_BUSY) {
CAN_SetupMessageObject(12, canFrame->canId.all,
CAN_MSG_FRAME_EXT, CAN_MSG_OBJ_TYPE_TX, 0,
CAN_MSG_OBJ_NO_FLAGS, CAN_DATA_NUM);
// Send 8 bytes data
CAN_SendMessage(12, CAN_DATA_NUM, canFrame->data);
g_transmitTestCnt2++;
return TRUE;
}
return FALSE;
}
Thanks and looking forward to your reply.
Best regards
Joe