If there is no delay function, can only send first frame out。
SendCANData(TX_MAILBOX, 0x01000001, canbuf, 8);
delay(100);
SendCANData(TX_MAILBOX, 0x01000002, canbuf, 8);
delay(100);
SendCANData(TX_MAILBOX, 0x01000003, canbuf, 8);
delay(100);
SendCANData(TX_MAILBOX, 0x01000004, canbuf, 8);
delay(100);
SendCANData(TX_MAILBOX, 0x01000005, canbuf, 8);
delay(100);
SendCANData(TX_MAILBOX, 0x010000A1, canbuf, 8);
delay(100);
Please help me.
Thank you.
Best Regards.
Hi,
If using the same MB for transmissions, then you must be sure the MB is successfully transmitted before you are going to fill it again. So instead of delay you can use driver function FLEXCAN_DRV_GetTransferStatus, for example as
/* Wait until the previous FlexCAN transmit is completed */
while(FLEXCAN_DRV_GetTransferStatus(FSL_CANCOM1, TX_MAILBOX) == STATUS_BUSY);
BR, Petr
Think you