23
1 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. Automotive Electronics CAN FD CAN with Flexible Data-rate Automotive Electronics Robert Bosch GmbH, Reutlingen FD 1

CAN with Flexible Data-Ratecan-newsletter.org/uploads/media/raw/30e0cfdc05de5f8312214873880… · Increasing demand for bandwidth in automotive communication Close gap between CAN

Embed Size (px)

Citation preview

1 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

Automotive Electronics

CAN FD CAN with Flexible Data-rate

Automotive Electronics Robert Bosch GmbH, Reutlingen

FD

1

AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

FlexRay

Implementation costs per node

Dat

a-ra

te [

bit/s

]

100k

100M

10M

1M

10k

CAN CAN FD

BroadR Reach

Broadcom

DSI PSI

LIN

MOST 150

Sensors & Embedded Control MM / Driver Assistance

2

AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

Motivation Increasing demand for bandwidth in automotive communication

Close gap between CAN (max. 1 MBit/s) and FlexRay (10 MBit/s)

Time-triggered communication not flexible enough

High effort for migration to FlexRay / Ethernet Hardware costs Software changes

Make CAN faster !

3

4 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

Speeding up CAN Unchanged CAN arbitration CAN acknowledge mechanism

New switch to higher bit rate for transmission of

Data Length Code Data Field Frame CRC

data fields with more than eight bytes possible configured by unused DLC codes “1001” to “1111” 12, 16, 20, 24, 32, 48, 64 bytes

new CRC polynomials for longer data fields, HD=6 17 bit: up to 16 byte data fields, 21 bit: up to 64 byte data fields

4

5 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

Speeding up CAN

Based on existing CAN

well known technology, minimized risk

changes limited to HW: protocol controller

for bit rates up 1 Mbit/s standard CAN transceivers usable

no changes to SW: with 8 bytes data field (legacy SW fully compatible)

even higher data rate possible by data fields >8 bytes and SW change

Costs similar to CAN

Data Phase shortened by switch to higher bit rate

Arbitration Phase

Arbitration Phase

CAN Frame

Arbitration Phase

Arbitration Phase

CAN FD Frame Example

Identifier 11 bit Data Field 32 byte Arbitration Phase 1 Mbit/s Data Phase 4 Mbit/s

average bit rate 3.1 Mbit/s

5

AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

6

Average CAN FD Bit Rate

0

1

2

3

4

5

6

0 1 2 3 4 5 6 7 8 9

Ave

rage

Bit

Rat

e (M

bit/

s)

Bit Rate Data Phase (Mbit/s)

Frame ID: 11 bit, Bit Rate Arbitration: 1Mbit

64 bytes payload 48 bytes payload 32 bytes payload 16 bytes payload 8 bytes payload

AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

7

Net CAN FD Bit Rate

0

1

2

3

4

5

6

0 1 2 3 4 5 6 7 8 9

Net

Bit

Rat

e (M

bit/

s)

Bit Rate Data Phase (Mbit/s)

Frame ID: 11 bit, Bit Rate Arbitration: 1Mbit

64 bytes payload 48 bytes payload 32 bytes payload 16 bytes payload 8 bytes payload

8 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

CAN FD with Bit Rates below 1 MBit/s Application: Long bus line limits bit rate for arbitration Arbitrate with e.g. 125 kbit/s Transmission of data field with e.g 500 kbit/s

Option: Transmission of long frames with up 64 bytes

payload Increase of net data rate Handling of large data packets w/o segmentation

0

50

100

150

200

0 100 200 300 400 500

Bit Rate Data Phase (kbit/s)

Ave

rage

Bit

Rat

e (k

bit/s

)

No requalification or redesign of transceivers necessary !

0

100

200

300

400

0 8 16 24 32 40 48 56 64

Payload (Byte)A

vera

ge B

it R

ate

(kbi

t/s)

8

Synchronous Switching of Bit Rate

AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

CAN_1

CAN_0

1650 us 1660 us

CAN_1

f_rx

can_rx

can_tx

sample_point

CAN_0

sample_point

can_rx

can_tx

f_tx

1651550 ns1651900 ns

1653900 ns1654333 ns

1654917 ns1655350 ns

350 ns2000 ns

433 ns584 ns

433 ns

1 65432

SRR IDE EDL r0 BRSId18 ACKCRC DlmStuffId19

r1 IDE EDL r0 BRSId0 ACKCRC DlmStuffId1

Example: CAN_0 wins arbitration at reserved/SRR bit Phase-shift before synchronization: ①② – 350 ns Phase-shift after synchronization: ③④ + 433 ns Phase-shift at beginning of Data Phase: ⑤⑥ + 433 ns

9

10 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

CAN FD Standard Frame

CAN FD Arbitration Phase length: 30 bit times* data rate: max. 1 MBit/s

CAN FD Data Phase length: 86 bit times* (8 data bytes) data rate: > 1 MBit/s

Remote Frames always in CAN Format RTR bit replaced by reserved bit r1 r1 takes part in CAN arbitration reserved for protocol expansion

* bit stuffing not considered

EDL – Extended Data Length Substitutes first reserved bit in standard frames EDL = recessive indicates CAN FD frame format (new DLC-coding and CRC) EDL = dominant indicates standard CAN frame format

r1, r0 – reserved bits Transmitted dominant, reserved for future protocol variants

BRS – Bit Rate Switch BRS = recessive: switch to alternate bit rate BRS = dominant: do not switch bit rate

ESI – Error State Indicator ESI = recessive: transmitting node is error passive ESI = dominant: transmitting node is error active

* 17 bit CRC for data fields with up to 16 bytes

CAN FD Arbitration

CAN FD Data

CAN FD Arbitration

S O F

4 bit DLC

0-64 bytes 21* bit CRC

11 bit Identifier 1 I D E

1 1 7 3

Arbitration Field Control Field Data Field CRC Field ACK EOF Int. Bus Idle

B R S

E S I

E D L

r 0

r 1

10

11 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

CAN FD Extended Frame

EDL – Extended Data Length Substitutes first reserved bit in standard frames EDL = recessive indicates CAN FD frame format (new DLC-coding and CRC) EDL = dominant indicates standard CAN frame format

r1, r0 – reserved bits Transmitted dominant, reserved for future protocol variants

BRS – Bit Rate Switch BRS = recessive: switch to alternate bit rate BRS = dominant: do not switch bit rate

ESI – Error State Indicator ESI = recessive: transmitting node is error passive ESI = dominant: transmitting node is error active

CAN FD Arbitration Phase length: 49 bit times* data rate: max. 1 MBit/s

CAN FD Data Phase length: 86 bit times* (8 data bytes) data rate: > 1 MBit/s

Remote Frames always in CAN Format RTR bit replaced by reserved bit r1 r1 takes part in CAN arbitration reserved for protocol expansion

* bit stuffing not considered

* 17 bit CRC for data fields with up to 16 bytes

CAN FD Data

CAN FD Arbitration

CAN FD Arbitration

S O F

4 bit DLC

0-64 bytes 21* bit CRC

11 bit Identifier S R R

1 I D E

1 1 7 3

Arbitration Field Control Field Data Field CRC Field ACK EOF Int.

18 bit Identifier Extension

E S I

E D L

r 0

B R S

r 1

Bus Idle

11

Structure of CAN FD Nodes

AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

Status

BitTimingLogic

Sam

ple Point

Sam

pled Bit

Data P

hase

Tx Bit

Sync M

ode

ScaledClock (tq)

Physical Layer

Protocol Controller

Transceiver

BitStreamProcessor

Bit Tim

e Configuration (A

rbitration Phase &

Data P

hase)

System ClockCA

N_R

x

CA

N_Tx

Tx-Rx-Loop-Delay

Shift

Load

Control

BaudRatePrescaler

CAN_HCAN_L

Rx D

ata

Tx Data

CAN Message

CAN Bus

Shift Register

Physical Layer unchanged for CAN FD same CAN transceivers

CAN FD Protocol Controller two sets of timing configuration

BTL and BRP control bit timing BTL and BRP switch between two sets

BSP controls frame (de)coding BSP defines Arbitration and Data Phase

CAN Message Handling shift register as (de)serializer BSP does not limit data field length

12

CAN FD Bit Rate Switching

AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

1 Time Quantum (tq)

Arbitration Bit Time

Sample Point

1 Time Quantum (tq)

DataBit Time

Sample Point

DataBit Time

DataCAN Time

DataBit Time

Sample Point Sample Point Sample Point

Sync_Seg Prop_Seg Phase_Seg1 Phase_Seg2

1 Time Quantum (tq)

BRS Bit

Sample Point

1 Time Quantum (tq)

CRC Delimiter

Sample Point

Sync_Seg Prop_Seg Phase_Seg1 Phase_Seg2

13

Example: (Bit rate in Data Phase) = 4 · (Bit rate in Arbitration Phase) Different length of time quanta, no Prop_Seg in Data Phase BRS bit with timing of Arbitration Phase until Sample Point CRC Delimiter with timing of Data Phase until Sample Point

14 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

CAN FD Demonstrator

CAN FD Communication

Arbitration Phase 1 Mbit/s Data Phase 12 Mbit/s Data Field 64 Byte

CAN_L– CAN_H

Arbitration PhaseData Phase

AckData Phase

Ack arbitrating

CAN FD Network

Bus Line 42 m CAN FD nodes 7 CAN Transceiver NXP TJA 1040

14

Transceiver Delay and Bus Line Delay

AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

DLC_3..0

Delay Tx->Rx

DataBRS ESI

BRS ESI

BRS ESI

BRS ESI

BRS ESI DLC_3..0 Data

Bus Line Delay

CAN_L – CAN_H

CAN FD Communication

Arbitration Phase 1 Mbit/s Data Phase 15 Mbit/s Bus Line 42 m

Delays in the CAN FD Network

measured at edge from BRS to ESI Transceiver Loop Delay 126 ns Bus Line Delay 163 ns

15

16 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

Transceiver Delay Compensation

Transceiver delay measured in system clock periods Configurable offset added to adjust Secondary Sample Point SSP inside bit time

SSP position rounded down to next integer number of time quanta tq Delayed transmit data compared against received data at SSP

check for bit errors

Transceiver Loop Delay is measured for each frame at the falling edge of bit EDL Delay compensation independent of transceiver characteristics

16

AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

17

Oscillator Tolerance – Rules Rules Arbitration Phase

Rule 1 Resynchronization

Rule 2 Sampling of Bit after Error Flag

Rules Data Phase (when Bit Rate is switched)

Rule 3 Resynchronization

Rule 4 Sampling of Bit after Error Flag

Rule 5 Bit Rate Switch

A

A

btsjwdf102 ⋅

<

( )[ ]AA

AA

pbbtpbpbdf

21322,1min

−⋅<

D

D

btsjwdf102 ⋅

<

( )

( )

+⋅−⋅

<

AA

DDD

AA

btBRPBRPpbbt

pbpbdf7262

2,1min

( )

++−⋅

−−

<

DDD

AAA

D

AD

btpbBRPBRPpbbt

BRPBRPsjw

df42222

1

17

18 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

Lab Validation – Exemplary Results

Network Topology Termin. Resist.

Bus Length

Max. Bit Rate*

Bus Signal (CANL–CANH)

ISO Bus Topology

2x120Ω 42m 15,0 Mbit/s

Passive Star

1x 60Ω 16m 3,5 Mbit/s

Passive Star

2x120Ω 16m 7,5 Mbit/s

Term. resistor CAN FD node *CAN Transceiver: NXP TJA 1040

18

19 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

Conclusion Gradual introduction of CAN FD nodes into CAN networks possible

Bosch CAN IPs currently upgraded to CAN FD (M_CAN, C_CAN) will be integrated into µCs, first samples E2012 upgrade of Bosch VHDL Reference CAN Model to CAN FD integration on µCs of other major manufacturers planned

Tool support for CAN FD started Vector and ETAS integrate CAN FD into their tool chain

Development of vehicle demonstrator with CAN FD network Joint project with automotive and semiconductor companies started

Check EMC issues Emission, Susceptibility / Immunity

Impact on different network topologies under investigation line, star, position of termination, different transceivers

Standardization as ISO 11898-7

Assure support in Higher Layer Protocols (e.g. AUTOSAR, CANopen)

19

20 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

Backup

20

23 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

Physical Layer

CAN Physical Layer Transceiver loop delay CAN_Tx CAN_Rx: up to 240ns delay on CAN bus line: ~5ns/m

CAN FD Arbitration Phase: arbitrate with remote nodes Limitation: delay[AB] + delay[BA] <TSEG1*

CAN FD Data Phase: transceiver delay compensation for bit monitoring Limitation: filter characteristics of input comparator and bus topology independent of length of CAN bus line

*TSEG1 = Time Segment before Sample Point

CAN_H

CAN_L CAN_Rx

CAN_Tx

transceiver loop delay

CAN_H

CAN_L CAN_Tx

CAN_Rx

transceiver loop delay

delay CAN bus line

delay[A->B]

delay[B->A]

Node A Node B

23

24 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

Remote Frames and CAN FD There are no remote frames in CAN FD format

RTR bit is replaced by dominant reserved bit r1 The reserved bit r1 takes part in CAN bit arbitration Bit r1 reserved for future protocol expansions,

e.g. using r1 as additional identifier bit Receivers ignore the actual value of bits r1, r0 in CAN FD frames

CAN FD controllers are able to handle remote frames in standard CAN format

24

26 AE/EIN | 10/10/2012 | © Robert Bosch GmbH 2012. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

CAN FD - CAN with Flexible Data-rate

Automotive Electronics

Lab Validation – Setup

USB

CAN Case XL FPGA-Board

1 2 3 4 5

Vector CANoe

Oscilloscope

short cables

FPGA-Board 2

6 7 8 9 10

USB

CAN Case XL

FPGA-Board 1

1 2 3 4 5

Vector CANoe

Oscilloscope

Bus Topology

CAN Transceiver i CAN cable 120 Ohm Sub-D Connector

Net

wor

k S

etup

B

oard

Set

up

Monitoring (CANoe)

26