# US 2021/0173961 A1 · Method of Using Protocol CRC to Implement End to End Protection of a CAN Message

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0173961 A1
- Document ID: US20210173961A1
- Status: Published application
- Kind: A1
- Application number: 16/707,357
- Filed: 2019-12-09
- Published: 2021-06-10
- Earliest claimed: 2019-12-09
- Assignees: NXP USA, Inc.
- Applicants: NXP USA, Inc.
- Inventors: Alison Young; Alan Devine; Andrew Edward Birnie
- Web page: https://patentgrep.com/patent/US20210173961A1

## CPC

- H04L 12/40013: {Details regarding a bus controller}
- G06F 21/64: Protecting data integrity, e.g. using checksums, certificates or signatures
- H04L 1/0061: {Error detection codes}
- H04L 49/90: Buffering arrangements
- H04L 63/12: {Applying verification of the received information (cryptographic mechanisms or cryptographic arrangements for data integrity or data verification H04L9/32)}
- H04L 63/168: {above the transport layer}
- H04L 69/324: in the data link layer [OSI layer 2], e.g. HDLC
- H04L 2012/40215: {Controller Area Network CAN}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system, method, and apparatus are provided for processing packets received over Controller Area Network (CAN) interface where a CAN protocol controller computes a CRC value from header and payload values in a received CAN data frame to verify frame integrity of the received CAN data frame across a physical media layer, and then stores the header and payload values and the CRC value in a memory buffer of the CAN protocol controller so that a host core can compute a reconstructed CRC value from the header and payload values retrieved from the memory buffer, and then compare the reconstructed CRC value to the CRC value retrieved from the memory buffer to verify frame integrity of the received CAN data frame at a transaction layer.

## Claims

### Claim 1

A method for processing packets received over Controller Area Network (CAN) interface, comprising:
computing, at a CAN protocol controller, a cyclic redundancy check (CRC) value from header and payload values in a received CAN data frame, thereby verifying frame integrity of the received CAN data frame across a physical media layer;
storing the header and payload values and CRC value in a memory buffer of the CAN protocol controller;
computing, at a host controller, a reconstructed CRC value from the header and payload values retrieved from the memory buffer; and
verifying frame integrity of the received CAN data frame at a transaction layer by comparing, at the host controller, the reconstructed CRC value to the CRC value retrieved from the memory buffer.

### Claim 2 (depends on 1)

The method of claim 1, where verifying frame integrity of the received CAN data frame across the physical media layer comprises:
computing, at the CAN protocol controller, a first CRC value from header and payload values in the received CAN data frame; and
comparing, at the CAN protocol controller, the first CRC value to the CRC value in the received CAN data frame to detect a match.

### Claim 3 (depends on 1)

The method of claim 1, further comprising removing a start-of-frame bit and any stuff bits from the header and payload values and the CRC value before storing the header and payload values and the CRC value in the memory buffer.

### Claim 4 (depends on 1)

The method of claim 1, further comprising constructing, at the host controller, a reconstructed CAN data frame comprising a start-of-frame bit, the header and payload values, and the reconstructed CRC value before inserting one or more stuff bits in the reconstructed CAN data frame.

### Claim 5 (depends on 1)

The method of claim 1, further comprising accessing, at the host controller, a lookup table to determine if the CAN data frame requires frame integrity verification by the host controller.

### Claim 6

A method for transmitting packets over Controller Area Network (CAN) interface, comprising:
constructing, at a host controller, a reference CAN data frame comprising header and payload values and a first cyclic redundancy check (CRC) value generated from at least the header and payload values to be transmitted;
storing, by the host controller, at least the first CRC value in memory;
loading a copy of the header and payload values in a memory buffer of a CAN protocol controller;
constructing a transmit CAN data frame comprising a protocol CRC value generated from at least the copy of the header and payload values to be transmitted;
storing the protocol CRC value in a memory buffer of the CAN protocol controller; and
comparing, at the host controller, the first CRC value to the protocol CRC value retrieved from the memory buffer, thereby verifying frame integrity of the transmit CAN data frame at an application layer.

### Claim 7 (depends on 6)

The method of claim 6, where constructing the reference CAN data frame comprises inserting one or more stuff bits and a stuff count (SB) into the reference CAN data frame.

### Claim 8 (depends on 7)

The method of claim 7, where storing at least the first CRC value in memory comprises storing the reference CAN data frame in memory of the host controller comprising a start of field frame, the first CRC value, the header and payload values, and the one or more stuff bits and the stuff count (SB).

### Claim 9 (depends on 8)

The method of claim 8, where the host controller loads the copy of the header and payload values in the memory buffer of the CAN protocol controller without including the start of field frame, first CRC value or the one or more stuff bits and the stuff count (SB).

### Claim 10 (depends on 9)

The method of claim 9, where the host controller retrieves the first CRC value from memory of the host controller for comparison to the protocol CRC value retrieved from the memory buffer of the CAN protocol controller.

### Claim 11 (depends on 6)

The method of claim 6, where the CAN protocol controller inserts, into the transmit CAN data frame, a start-of-frame field, the protocol CRC value and any required stuff bits and stuff count (SB) values.

### Claim 12 (depends on 11)

The method of claim 11, where the CAN protocol controller transmits the transmit CAN data frame and stores a copy of the protocol CRC value in the memory buffer of the CAN protocol controller.

### Claim 13

A Controller Area Network (CAN) device, the CAN device comprising a CAN protocol controller connected between a host and a CAN transceiver interface to process packets received and/or transmitted over the CAN transceiver interface,
wherein the CAN protocol controller computes a cyclic redundancy check (CRC) value from header and payload values in a CAN data frame received over the CAN transceiver interface for storage in memory with the header and payload values, thereby verifying frame integrity of the received CAN data frame across a physical media layer; and
wherein the host verifies the CRC value by computing a reconstructed CRC value from the header and payload values retrieved from memory and comparing the reconstructed CRC value with the CRC value retrieved from memory, thereby verifying frame integrity of the received CAN data frame at a transaction layer.

### Claim 14 (depends on 13)

The CAN device of claim 13, where the CAN protocol controller verifies the frame integrity of the received CAN data frame across the physical media layer by:
computing a first CRC value from header and payload values in the received CAN data frame; and
comparing the first CRC value to the CRC value in the received CAN data frame to detect a match.

### Claim 15 (depends on 13)

The CAN device of claim 13, where the CAN protocol controller is configured to remove a start-of-frame bit and any stuff bits from the header and payload values and the CRC value before storing the header and payload values and the CRC value in memory.

### Claim 16 (depends on 13)

The CAN device of claim 13, where the host is configured to construct a reconstructed CAN data frame comprising a start-of-frame bit, the header and payload values, and the reconstructed CRC value before inserting one or more stuff bits in the reconstructed CAN data frame.

### Claim 17 (depends on 13)

The CAN device of claim 13, where the host is configured to access a lookup table to determine if the CAN data frame requires frame integrity verification by the host.

### Claim 18 (depends on 13)

A CAN device of claim 13, where the host is further configured to transmit packets over the CAN transceiver interface by constructing a second CRC value from transmit header and payload values and any start-of-frame bit and any stuff bits to be transmitted over the CAN transceiver interface and storing the second CRC value in memory; and
where the CAN protocol controller is further configured to construct and store in a memory buffer a transmit CAN data frame comprising a second protocol CRC value generated from at least the copy of the transmit header and payload values so that the host can compare the second CRC value to the second protocol CRC value retrieved from the memory buffer, thereby verifying frame integrity of the transmit CAN data frame at an application layer.

### Claim 19 (depends on 18)

The CAN device of claim 18, where the host is further configured to construct a transmit reference CAN data frame comprising the transmit header and payload values and the second cyclic redundancy check (CRC) value.

### Claim 20 (depends on 19)

The CAN device of claim 19, where the host is further configured to insert one or more stuff bits and a stuff count (SB) into the transmit reference CAN data frame.
