- 
                Notifications
    
You must be signed in to change notification settings  - Fork 8.2k
 
Description
Describe the bug
Many of the CAN drivers don't check that the device is set to FD mode before sending an FD frame. Depending on the device, this could do a lot of random things. On mcan (The device I found this on originally), if the DLC is higher then 8, that higher DLC is written to the bus, and then only 10 bytes of data are written, and nothing else, which causes all devices to see an error.
Expected behavior
CAN send should fail if an FD frame is sent without FD mode enabled on the device
Impact
Difficult to debug behavior, depending on the device either could fail, or write bad frames to the bus.
Logs and console output
If applicable, add console logs or other types of debug information
e.g Wireshark capture or Logic analyzer capture (upload in zip archive).
copy-and-paste text and put a code fence (```) before and after, to help
explain the issue. (if unable to obtain text log, add a screenshot)
Environment (please complete the following information):
- OS: (e.g. Linux, MacOS, Windows)
 - Toolchain (e.g Zephyr SDK, ...)
 - Commit SHA or Version used
 
Additional context
#50769 is a fix for mcan.