Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-56720

Improve CAN FD support

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9
    • 5.8.0 Beta
    • SerialBus: CAN Bus
    • None
    • 0ce15a0b241ca46a76d0b5693c1b5b811c55ac49 d4bbdb83b26f8219b6c64bcff3967aa15db07d9c

    Description

      Currently, the decision CAN FD or CAN 2.0 is taken by the configuration parameter CanFdKey at CAN device level. This looks incorrect to me.

      The same way CAN Standard and Extended ID's can be mixed (Extended IDs have a range from 0x00000000 to 0x1FFFFFFF, with the IDE bit set), CAN 2.0 and CAN FD frames can be mixed on one bus (CAN FD has 0...64 data bytes, so CAN FD frames with e.g. 1 data bytes exists) SocketCAN's candump displays them with two-digit length:

      vcan0       1AD  [01]  DC

      Currently there is no way to distinguish between CAN 2.0 and CAN FD frames in QtSerialBus. I guess the following tasks are necessary:

      • Extend QCanBusFrame with a flag extendedDataLength and use this to send CAN 2.0 vs. CAN FD frames, set this flag appropriate on receiving
      • Change QCanBusFrame::toString() to always print
        • [x] as length for CAN 2.0 frames (0 <= x <= 8)
        • [yy] as length for CAN FD frames (00 <= yy <= 64)
      • Enable CAN FD on compatible hardware to allow transferring and receiving both kinds of frames
      • Another bit for "bitrate switching" has to be defined in QCanBusFrame along with the data bitrate configuration parameter

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-56720
          # Subject Branch Project Status CR V

          Activity

            People

              aha_1980 André Hartmann
              aha_1980 André Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes