Hi team,
I tried to send the OOB data through the CAN-FD in the 6843 device.
I am able to visualize the data through the Peak CAN viewer. Only the frame header is padded with 8 bytes of 'CC', but not the TLV header or the TLV data.
Please refer the below image of the CAN trace file.
Can you explain why this happened?
I found the code snippet for the calculation of pad-size in the canfd.c file
location: sdk_v3.6.0.0_installation_directory\ti\mmwave_sdk_03_06_00_00-LTS\packages\ti\drivers\canfd\src\canfd.c
for(index = 0U ; index < 16U ; index++) { if(dataLength <= ptrCanFdMCB->mcanDataSize[index]) { txBuffElem.dlc = index; padSize = ptrCanFdMCB->mcanDataSize[index] - dataLength; break; } } txBuffElem.dlc = index; //changes if (index == 16) { *errCode = CANFD_EINVAL; retVal = MINUS_ONE; } else { /* Pad the unused data in payload */ index = dataLength; while (padSize != 0) { txBuffElem.data[index++] = (uint8_t)0xCCU; padSize--; }
It would be helpful if you explain this part of the code also.
Thanks