2020-07-15 04:40 PM
I am using a STM32H753 I send a 64-byte frame from a PEAK USB CAN FD device to the STM32:
Timestamp: 0.000000 ID: 00000582 X DLC: 64 0a 06 0d 00 00 04 28 7b 22 62 75 69 6c 64 5f 63 66 67 22 3a 7b 22 74 6f 6f 6c 5f 73 69 7a 65 22 3a 31 32 2c 22 74 6f 6f 6c 5f 62 6f 64 69 65 73 22 3a 5b 7b 22 62 6f 64 79 5f 74 79 70 65 22 3a
And I get this in the FIFO1 RX memory of the STM32:
82 05 00 40 00 00 0f 01 0a 06 0d 00 00 04 28 7b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
If I limit the frames to 8 byte payload everything works but it seems with 64-byte it only gets the first 8 bytes of payload.
I have the BitRateShifting enabled running at the Data Rate of 2Mbit/s
80MHz FDCAN clock
Prescaler 8
SJW 1
tseg1 5
tseg2 4
Data Prescalar 4
SJW 1
tseg1 5
tseg2 5
2020-07-16 08:21 AM
This turned out to be a python script problem for sending frames from the PEAK USB CAN FD device. I needed to explicitly set is_fd=True even if I set other parameters that are only supported by FD such as bitrate_switch otherwise I only got 8-bytes of payload received.
msg_tx = can.Message(arbitration_id=ARB_ID | SERVICE_REQ,
data=data_in,
extended_id=True, bitrate_switch=True, is_fd=True)