Skip to content

CAN: Add support for CAN-XL#133

Open
stephan-thiele wants to merge 46 commits intosigrokproject:masterfrom
stephan-thiele:can/add-canxl-decoder
Open

CAN: Add support for CAN-XL#133
stephan-thiele wants to merge 46 commits intosigrokproject:masterfrom
stephan-thiele:can/add-canxl-decoder

Conversation

@stephan-thiele
Copy link
Copy Markdown
Contributor

This PR builds on #132. Please do not review or merge, until #132 has been merged!

Currently CAN decoder is able to decode Classic CAN and CAN-FD frames. In this PR, the ability to decode CAN-XL frames is added.

  • As CAN-XL has its own bitrate and its own sample point, the new two options XL bitrate (bits/s) and XL sample point (%) are introduced.
  • In contrast to CAN-FD, where the bitrate switch was done at the sample point of BRS and CRC delimiter, bitrate switch is now done at the end of the mentioned bits.
  • In XL data phase, a fixed bit stuffing is used with a stuff rate of 11 (after every 10th bit).
  • Data length can now be up to 2048 bytes and cannot be 0 anymore (1 is minimum)
  • In contrast to CAN-FDs SBC field, where an even parity scheme is used, on SBC field of CAN-XL, an odd parity scheme is used.

In order to make reviewing of individual commits more easy, the following line is added at the end of the XL decoder code, to avoid undefined decoding. It is removed in the last decoding related commit:

elif self.xl:
            return # Stop decoding here, as long as CAN-XL implementation is incomplete. TODO: Remove at AH2 bit.

I will do additional PRs in sigrok-dumps with some CAN-XL captures and in sigrok-test repo with some CAN-XL test vectors and link them here once they are created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant