I am using the FlexCan API `FLEXCAN_TransferSendBlocking` to send data across the CAN bus from a iMXRT1064 to an iMX8MP. Monitoring the CAN bus with a logic analyser I see the data is sent in big endian order. Is there a way to switch to little endian order without translating the endian order before I pass the data to `FLEXCAN_TransferSendBlocking` (and similar)
The code snippet I'm using to send the data is:
union {
float f;
uint32_t i;
} floatToUint;
floatToUint.f = 1.234f; // 0x3f9df3b6
flexcan_frame_t txFrame;
txFrame.id = FLEXCAN_ID_STD(TX_MB_ID);
txFrame.format = (uint8_t)kFLEXCAN_FrameFormatStandard;
txFrame.type = (uint8_t)kFLEXCAN_FrameTypeData;
txFrame.length = sizeof(floatToUint)
txFrame.dataWord0 = floatToUint.i; // 0x3f9df3b6
FLEXCAN_TransferSendBlocking(CAN2, TX_MESSAGE_BUFFER_NUM, &txFrame)
Output of logic analyser:
sending 1.234f (0x3f9df3b6)