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.

F28377D CAN 发送数据长度问题

Other Parts Discussed in Thread: C2000WARE

使用F28377D CAN进行通信,用的是C2000ware里的driverlib库C:\ti\c2000\C2000Ware_1_00_06_00\driverlib\f2837xd\driverlib,

用CAN_setupMessageObject(CANA_BASE, 1, 0x1, CAN_MSG_FRAME_STD,
                           CAN_MSG_OBJ_TYPE_TX, 0, CAN_MSG_OBJ_TX_INT_ENABLE, 8);这个函数配置的MessageObject,此时数据长度配置为8

在发送数据时用CAN_sendMessage(CANA_BASE, 1, 6, txMsgData); 这个函数,希望输出数据长度为6

但发现无论这个函数怎么配置,发送的数据都是8个,好像这个函数配置的长度不管用,请问是什么原因,我希望在程序里可以发送任意长度的数据,可以发送时设置,怎么实现?