Skip to content

Commit 766496a

Browse files
Benedikt MenneBenedikt Menne
authored andcommitted
Adapting error handling and bus error specification for LIN.
1 parent 40c89f7 commit 766496a

File tree

3 files changed

+177
-9
lines changed

3 files changed

+177
-9
lines changed

docs/4_4_2_lin.adoc

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,36 +270,51 @@ h|State h|Error Code h|Description
270270

271271
|BIT_ERROR
272272
|0x01
273-
|Represents a bit error.
274-
The given error is always related to a specific <<low-cut-lin-transmit-operation, `Transmit`>> operation.
273+
|A BIT_ERROR means that a received bit does not match the expected value.
274+
This <<low-cut-lin-bus-error-operation, `Bus Error`>> operation is a direct reaction to a <<#table-lin-header-operation, `Header`>> operation and shall be delivered to the Network FMU that is configured as <<table-lin-configuration-node-definition-kinds, `LIN_MASTER`>> within the specified LIN network.
275275

276276
|CHECKSUM_ERROR
277277
|0x02
278278
|Represents a CRC error.
279279
The error can occur during a collision of multiple response frames when Event-Triggered-Frames are used.
280-
The given error is always related to a specific <<low-cut-lin-transmit-operation, `Transmit`>> operation.
280+
This <<low-cut-lin-bus-error-operation, `Bus Error`>> operation is a direct reaction to a <<#table-lin-response-operation, `Response`>> operation and shall be delivered to the Network FMU that is configured as <<table-lin-configuration-node-definition-kinds, `LIN_MASTER`>> of the specified LIN network.
281281

282282
|IDENTIFIER_PARITY_ERROR
283283
|0x03
284284
|Represents an Identifier Parity Error.
285285
The error can occur during a collision of multiple LIN headers.
286-
The given error is always related to a specific <<low-cut-lin-transmit-operation, `Transmit`>> operation.
286+
This <<low-cut-lin-bus-error-operation, `Bus Error`>> operation is a direct reaction to a <<#table-lin-header-operation, `Header`>> operation and shall be delivered to all Network FMUs of the specified LIN network.
287287

288288
|SLAVE_NOT_RESPONDING_ERROR
289289
|0x04
290290
|Represents a Slave Not Responding Error.
291291
The error can occur if LIN Slaves does not respond to a specified LIN header.
292-
The given error is always related to a specific <<low-cut-lin-transmit-operation, `Transmit`>> operation.
292+
This <<low-cut-lin-bus-error-operation, `Bus Error`>> operation is a direct reaction to a <<#table-lin-header-operation, `Header`>> operation and shall be delivered to the Network FMU that is configured as <<table-lin-configuration-node-definition-kinds, `LIN_MASTER`>> within the specified LIN network.
293293

294294
|SYNCH_FIELD_ERROR
295295
|0x05
296296
|Represents an Inconsistent-Synch Field Error.
297-
The given error is always related to a specific <<low-cut-lin-transmit-operation, `Transmit`>> operation.
297+
This <<low-cut-lin-bus-error-operation, `Bus Error`>> operation is a direct reaction to a <<#table-lin-header-operation, `Header`>> operation and shall be delivered to the Network FMUs that are configured as <<table-lin-configuration-node-definition-kinds, `LIN_SLAVE`>> within the specified LIN network.
298298

299-
|PHYSICAL_BUS_ERROR
299+
|SYNCH_TOLERANCE_ERROR
300300
|0x06
301+
|The calculated baud rate deviates too much from the original baud rate after clock synchronization (tolerance exceeded).
302+
This <<low-cut-lin-bus-error-operation, `Bus Error`>> operation is a direct reaction to a <<#table-lin-header-operation, `Header`>> operation and shall be delivered to the Network FMUs that are configured as <<table-lin-configuration-node-definition-kinds, `LIN_SLAVE`>> within the specified LIN network.
303+
304+
|HEADER_TIMEOUT_ERROR
305+
|0x07
306+
|A header timeout error means that a slave node did not receive a complete header from the master within the specified time frame.
307+
This <<low-cut-lin-bus-error-operation, `Bus Error`>> operation is a direct reaction to a <<#table-lin-header-operation, `Header`>> operation and shall be delivered to the Network FMUs that are configured as <<table-lin-configuration-node-definition-kinds, `LIN_SLAVE`>> within the specified LIN network.
308+
309+
|FRAME_ERROR
310+
|0x08
311+
|This represents an error in the stop bit or in the frame format.
312+
This <<low-cut-lin-bus-error-operation, `Bus Error`>> operation is a direct reaction to any <<low-cut-lin-transmit-operation, `Transmit`>> operation and shall be delivered to all Network FMUs of the specified LIN network.
313+
314+
|PHYSICAL_BUS_ERROR
315+
|0x09
301316
|Represents a Physical Bus Error.
302-
The given error is always related to a specific <<low-cut-lin-transmit-operation, `Transmit`>> operation.
317+
This <<low-cut-lin-bus-error-operation, `Bus Error`>> operation is a direct reaction to any <<low-cut-lin-transmit-operation, `Transmit`>> operation and shall be delivered to all Network FMUs of the specified LIN network.
303318

304319
|====
305320

@@ -480,7 +495,14 @@ This configuration must be done before the first exchange of <<low-cut-lin-trans
480495
A Bus Simulation should stop as soon as more than one LIN Master is configured in a network.
481496

482497
===== Error Handling [[low-cut-lin-error-handling]]
483-
#To be defined.#
498+
LIN provides extensive options for detecting bus errors.
499+
Overall, the respective bus errors affect the internal controller status within the Network FMUs.
500+
To maintain the internal controller status, <<low-cut-lin-bus-error-operation, `Bus Error`>> operations shall be provided to all relevant Network FMUs by the Bus Simulation.
501+
Depending on the type of <<low-cut-lin-bus-error-operation, `Bus Error`>> operation and specific kind of <<low-cut-lin-transmit-operation, `Transmit`>> operation a different subset of Network FMUs must be notified via <<low-cut-lin-bus-error-operation, `Bus Error`>> operation (see <<table-lin-bus-error-codes>> for details).
502+
503+
.Architectural error handling overview.
504+
[#figure-lin-architectural-error-handling-overview]
505+
image::lin_error_handling_overview.svg[width=80%, align="center"]
484506

485507
===== Wake Up/Sleep [[low-cut-lin-wakeup-sleep]]
486508
This standard supports wake up and sleep for the LIN bus, whereby only the bus-specific parts are taken into account.
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0" version="28.2.9">
2+
<diagram id="zssgmvdwZO7xPkAqMUr9" name="Page-1">
3+
<mxGraphModel dx="511" dy="287" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
4+
<root>
5+
<mxCell id="0" />
6+
<mxCell id="1" parent="0" />
7+
<mxCell id="v5oIvpwDgeikFxTejpUY-1" value="" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=#999999;strokeWidth=2;" parent="1" vertex="1">
8+
<mxGeometry x="40" y="6" width="120" height="80" as="geometry" />
9+
</mxCell>
10+
<mxCell id="v5oIvpwDgeikFxTejpUY-2" value="" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=#999999;strokeWidth=2;" parent="1" vertex="1">
11+
<mxGeometry x="200" y="6" width="120" height="80" as="geometry" />
12+
</mxCell>
13+
<mxCell id="v5oIvpwDgeikFxTejpUY-4" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
14+
<mxGeometry x="89" y="56" width="20" height="20" as="geometry" />
15+
</mxCell>
16+
<mxCell id="v5oIvpwDgeikFxTejpUY-5" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
17+
<mxGeometry x="251" y="56" width="20" height="20" as="geometry" />
18+
</mxCell>
19+
<mxCell id="v5oIvpwDgeikFxTejpUY-18" value="&lt;div style=&quot;font-size: 16px;&quot;&gt;&lt;font style=&quot;font-size: 16px;&quot;&gt;FMU&lt;/font&gt;&lt;/div&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;" parent="1" vertex="1">
20+
<mxGeometry x="70" y="26" width="60" height="30" as="geometry" />
21+
</mxCell>
22+
<mxCell id="v5oIvpwDgeikFxTejpUY-21" value="&lt;div style=&quot;font-size: 16px;&quot;&gt;&lt;font style=&quot;font-size: 16px;&quot;&gt;FMU&lt;/font&gt;&lt;/div&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;" parent="1" vertex="1">
23+
<mxGeometry x="230" y="26" width="60" height="30" as="geometry" />
24+
</mxCell>
25+
<mxCell id="KEQrLfB2FrUfxKy-oO7P-1" value="" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=#999999;strokeWidth=2;" parent="1" vertex="1">
26+
<mxGeometry x="40" y="130" width="440" height="80" as="geometry" />
27+
</mxCell>
28+
<mxCell id="v5oIvpwDgeikFxTejpUY-17" value="" style="endArrow=none;html=1;fontSize=20;fillColor=#b1ddf0;strokeColor=#7EA6E0;rounded=0;strokeWidth=7;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;connectable=1;" parent="1" edge="1">
29+
<mxGeometry width="50" height="50" relative="1" as="geometry">
30+
<mxPoint x="460" y="160" as="sourcePoint" />
31+
<mxPoint x="60" y="160" as="targetPoint" />
32+
<Array as="points">
33+
<mxPoint x="290" y="160" />
34+
<mxPoint x="110" y="160" />
35+
</Array>
36+
</mxGeometry>
37+
</mxCell>
38+
<mxCell id="KEQrLfB2FrUfxKy-oO7P-3" value="" style="endArrow=none;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeWidth=3;strokeColor=#7EA6E0;" parent="1" target="v5oIvpwDgeikFxTejpUY-4" edge="1">
39+
<mxGeometry width="50" height="50" relative="1" as="geometry">
40+
<mxPoint x="99" y="160" as="sourcePoint" />
41+
<mxPoint x="78.5" y="110" as="targetPoint" />
42+
</mxGeometry>
43+
</mxCell>
44+
<mxCell id="KEQrLfB2FrUfxKy-oO7P-4" value="" style="endArrow=none;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeWidth=3;strokeColor=#7EA6E0;" parent="1" target="v5oIvpwDgeikFxTejpUY-5" edge="1">
45+
<mxGeometry width="50" height="50" relative="1" as="geometry">
46+
<mxPoint x="261" y="160" as="sourcePoint" />
47+
<mxPoint x="280.65999999999997" y="100" as="targetPoint" />
48+
</mxGeometry>
49+
</mxCell>
50+
<mxCell id="KEQrLfB2FrUfxKy-oO7P-5" value="&lt;font style=&quot;font-size: 20px;&quot;&gt;Bus Simulation&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;connectable=1;fontSize=20;" parent="1" vertex="1">
51+
<mxGeometry x="61" y="176" width="400" height="30" as="geometry" />
52+
</mxCell>
53+
<mxCell id="KEQrLfB2FrUfxKy-oO7P-9" value="" style="endArrow=none;html=1;rounded=0;strokeColor=#FFFFFF;strokeWidth=3;fontSize=16;dashed=1;" parent="1" edge="1">
54+
<mxGeometry width="50" height="50" relative="1" as="geometry">
55+
<mxPoint x="238" y="160" as="sourcePoint" />
56+
<mxPoint x="283" y="160" as="targetPoint" />
57+
</mxGeometry>
58+
</mxCell>
59+
<mxCell id="87jym6ML_O6BWsMyHYAe-4" value="" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=#999999;strokeWidth=2;" parent="1" vertex="1">
60+
<mxGeometry x="360" y="6" width="120" height="80" as="geometry" />
61+
</mxCell>
62+
<mxCell id="87jym6ML_O6BWsMyHYAe-5" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
63+
<mxGeometry x="410" y="56" width="20" height="20" as="geometry" />
64+
</mxCell>
65+
<mxCell id="87jym6ML_O6BWsMyHYAe-6" value="&lt;div style=&quot;font-size: 16px;&quot;&gt;&lt;font style=&quot;font-size: 16px;&quot;&gt;FMU&lt;/font&gt;&lt;/div&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;" parent="1" vertex="1">
66+
<mxGeometry x="390" y="26" width="60" height="30" as="geometry" />
67+
</mxCell>
68+
<mxCell id="87jym6ML_O6BWsMyHYAe-7" value="" style="endArrow=none;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeWidth=3;strokeColor=#7EA6E0;" parent="1" target="87jym6ML_O6BWsMyHYAe-5" edge="1">
69+
<mxGeometry width="50" height="50" relative="1" as="geometry">
70+
<mxPoint x="420" y="160" as="sourcePoint" />
71+
<mxPoint x="439.65999999999997" y="100" as="targetPoint" />
72+
</mxGeometry>
73+
</mxCell>
74+
<mxCell id="87jym6ML_O6BWsMyHYAe-8" value="" style="endArrow=classic;html=1;rounded=0;fontSize=8;endSize=6;strokeColor=#006633;" parent="1" edge="1">
75+
<mxGeometry width="50" height="50" relative="1" as="geometry">
76+
<mxPoint x="90.81" y="89" as="sourcePoint" />
77+
<mxPoint x="90.81" y="127" as="targetPoint" />
78+
</mxGeometry>
79+
</mxCell>
80+
<mxCell id="87jym6ML_O6BWsMyHYAe-9" value="Header or&lt;br&gt;Header Response" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;fontColor=#006633;" parent="1" vertex="1">
81+
<mxGeometry x="20" y="102" width="69" height="10" as="geometry" />
82+
</mxCell>
83+
<mxCell id="87jym6ML_O6BWsMyHYAe-10" value="" style="endArrow=none;html=1;rounded=0;fontSize=8;endSize=6;startArrow=classic;startFill=1;endFill=0;fillColor=#f8cecc;strokeColor=#990000;" parent="1" edge="1">
84+
<mxGeometry width="50" height="50" relative="1" as="geometry">
85+
<mxPoint x="269" y="89" as="sourcePoint" />
86+
<mxPoint x="269" y="127" as="targetPoint" />
87+
</mxGeometry>
88+
</mxCell>
89+
<mxCell id="87jym6ML_O6BWsMyHYAe-11" value="Bus Error" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;fontColor=#990000;" parent="1" vertex="1">
90+
<mxGeometry x="270" y="105" width="90" height="10" as="geometry" />
91+
</mxCell>
92+
<mxCell id="87jym6ML_O6BWsMyHYAe-12" value="" style="endArrow=none;html=1;rounded=0;fontSize=8;endSize=6;startArrow=classic;startFill=1;endFill=0;fillColor=#f8cecc;strokeColor=#990000;" parent="1" edge="1">
93+
<mxGeometry width="50" height="50" relative="1" as="geometry">
94+
<mxPoint x="428" y="89" as="sourcePoint" />
95+
<mxPoint x="428" y="127" as="targetPoint" />
96+
</mxGeometry>
97+
</mxCell>
98+
<mxCell id="87jym6ML_O6BWsMyHYAe-14" value="" style="endArrow=none;html=1;rounded=0;fontSize=8;endSize=6;startArrow=classic;startFill=1;endFill=0;fillColor=#f8cecc;strokeColor=#990000;" parent="1" edge="1">
99+
<mxGeometry width="50" height="50" relative="1" as="geometry">
100+
<mxPoint x="107" y="89" as="sourcePoint" />
101+
<mxPoint x="107" y="127" as="targetPoint" />
102+
</mxGeometry>
103+
</mxCell>
104+
<mxCell id="87jym6ML_O6BWsMyHYAe-16" value="" style="verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.flash;fontSize=8;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
105+
<mxGeometry x="243" y="140" width="32" height="40" as="geometry" />
106+
</mxCell>
107+
<mxCell id="KrRxnjXIWImUbvIDb2Ig-5" value="Bus Error" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;fontColor=#990000;" parent="1" vertex="1">
108+
<mxGeometry x="429" y="105" width="90" height="10" as="geometry" />
109+
</mxCell>
110+
<mxCell id="KrRxnjXIWImUbvIDb2Ig-7" value="Bus Error" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;fontColor=#990000;" parent="1" vertex="1">
111+
<mxGeometry x="109" y="105" width="90" height="10" as="geometry" />
112+
</mxCell>
113+
<mxCell id="AOx-TkYyCgbOwTKHLzrx-1" value="LIN Master" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=6;fontColor=#000000;" parent="1" vertex="1">
114+
<mxGeometry x="44" y="9" width="110" height="10" as="geometry" />
115+
</mxCell>
116+
<mxCell id="AOx-TkYyCgbOwTKHLzrx-2" value="LIN Slave" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=6;fontColor=#000000;" parent="1" vertex="1">
117+
<mxGeometry x="204" y="9" width="110" height="10" as="geometry" />
118+
</mxCell>
119+
<mxCell id="AOx-TkYyCgbOwTKHLzrx-3" value="LIN Slave" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=6;fontColor=#000000;" parent="1" vertex="1">
120+
<mxGeometry x="364" y="9" width="110" height="10" as="geometry" />
121+
</mxCell>
122+
<mxCell id="ExQfgM2jieRh9owSLS6Z-1" value="Response" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;fontColor=#006633;" vertex="1" parent="1">
123+
<mxGeometry x="181" y="102" width="69" height="10" as="geometry" />
124+
</mxCell>
125+
<mxCell id="ExQfgM2jieRh9owSLS6Z-2" value="" style="endArrow=classic;html=1;rounded=0;fontSize=8;endSize=6;strokeColor=#006633;" edge="1" parent="1">
126+
<mxGeometry width="50" height="50" relative="1" as="geometry">
127+
<mxPoint x="251.81" y="89" as="sourcePoint" />
128+
<mxPoint x="251.81" y="127" as="targetPoint" />
129+
</mxGeometry>
130+
</mxCell>
131+
<mxCell id="ExQfgM2jieRh9owSLS6Z-3" value="Response" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;fontColor=#006633;" vertex="1" parent="1">
132+
<mxGeometry x="340" y="102" width="69" height="10" as="geometry" />
133+
</mxCell>
134+
<mxCell id="ExQfgM2jieRh9owSLS6Z-4" value="" style="endArrow=classic;html=1;rounded=0;fontSize=8;endSize=6;strokeColor=#006633;" edge="1" parent="1">
135+
<mxGeometry width="50" height="50" relative="1" as="geometry">
136+
<mxPoint x="410.81" y="89" as="sourcePoint" />
137+
<mxPoint x="410.81" y="127" as="targetPoint" />
138+
</mxGeometry>
139+
</mxCell>
140+
</root>
141+
</mxGraphModel>
142+
</diagram>
143+
</mxfile>

docs/images/lin_error_handling_overview.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)