Hi,
if you want to send new std ID value just modify ID standard filed of selected MB having IDE=0 and let module to send it by updating CODE field. If running SDK driver simply use Send function
If you want to flip bit of sending message, to disturb a frame, then module is not able to do that.
BR, Petr
Sorry, I can describe it more clearly
When sending CAN data, the specified bit needs to be changed, and when receiving CAN data, it is necessary to judge whether the specified bit data is 0 or 1. Do you have any suggestions?
Hi,
when sending message MB ID word specify teh ID to be send, when MB receive a message its ID word stores the ID received.
BR, Petr
Can I do this by reading and writing this struct?
Hi,
yes this structure is used for buffer variable used for receiving. After successful message receiving this variable is updated
/* Define receive buffer */
flexcan_msgbuff_t recvBuff;
/* Start receiving data in RX_MAILBOX. */
FLEXCAN_DRV_Receive(INST_CANCOM1, RX_MAILBOX, &recvBuff);
To send message below is used and the ID is parameter of Send function
flexcan_data_info_t dataInfo =
{
.data_length = 8,
.msg_id_type = FLEXCAN_MSG_ID_STD,
.enable_brs = false,
.fd_enable = false,
.fd_padding = 0U
};
/* Execute send non-blocking */
FLEXCAN_DRV_Send(INST_CANCOM1, mailbox, &dataInfo, messageId, data);
BR, Petr
Excuse me, the ID data type in the structure is uint_32, and the 18th to 28th bits represent the arbitration ID?
yes, you are right.
BR, Petr
thank you very much