Other Parts Discussed in Thread: C2000WARE
Hello,
I am using 2 boards of TMS320F28379D Launchpad for CAN bus communication. (C2000Ware_4_00_00_00)
Configured CAN -B on CPU2 for both the controller and able to send and receive data (char data)
Since driverlib msg data argument is Uint16_t[8] and I am not able to send and receive float data.
Any lead will be appreciated for how to transfer 2 float values over can
sending floT Values as below
memcpy(&jj,&f,4); // copying float to int
//
memcpy(jj, &f, sizeof(float32_t)); // copying int to short int array of 2
txMsgData[0] = jj[0] & 0xFFu;
txMsgData[1] = (jj[0] >> 8) & 0xFFu;
txMsgData[2] = jj[1] & 0xFFu;
txMsgData[3] = (jj[1] >> 8) & 0xFFu;
and sending txMsgData.
on the receiver part, I am able to see data same as this on CAN B register but unable to extract from receiving short int buffer.