Commit e4421ac8 authored by Ille, Ondrej, Ing.'s avatar Ille, Ondrej, Ing.

Merge branch '323-add-protocol-control-exception-on-r0-after-fdf' into 'master'

Resolve "Add Protocol control exception on r0 after FDF"

Closes #323

See merge request !338
parents 4b836596 e75f1f3b
Pipeline #19773 passed with stage
in 16 seconds
......@@ -509,7 +509,7 @@ filename "version.tex"
\noindent
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="14" columns="4">
<lyxtabular version="3" rows="15" columns="4">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="1.5cm">
<column alignment="center" valignment="top" width="2cm">
......@@ -1020,13 +1020,51 @@ Clarify behaviour of Transmitter delay measurement.
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
2.2.4
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Ondrej Ille
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
13-12-2019
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Clarify that only TEC above 255 will cause node to go Bus off.
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
2.2.5
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
......@@ -1042,7 +1080,7 @@ Ondrej Ille
\begin_inset Text
\begin_layout Plain Layout
13-12-2019
30-4-2020
\end_layout
\end_inset
......@@ -1051,7 +1089,7 @@ Ondrej Ille
\begin_inset Text
\begin_layout Plain Layout
Clarify that only TEC above 255 will cause node to go Bus off.
Add SETTING[PEX] and Protocol exception support.
\end_layout
\end_inset
......@@ -2610,12 +2648,341 @@ n 1.0.
This register shall be modified only when SETTINGS[ENA] = 0.
\end_layout
\begin_layout Subsection
Implementation type
\end_layout
\begin_layout Standard
ISO11898-1 2015 defines three implementation types of CAN protocol: Classical
CAN, CAN FD tolerant and CAN FD enabled.
CTU CAN FD supports all three implementation types and compliance to each
implementation can be changed via MODE[FDE] and SETTINGS[PEX] registers.
Both of these registers chall be modified only when SETTINGS[ENA] = 0.
\end_layout
\begin_layout Standard
CTU CAN FD can be configured to support only CAN 2.0 protocol.
When MODE[FDE] = 0, CTU CAN FD can't receive CAN FD frames and transmitts
error frames as response to CAN FD frames.
When MODE[FDE] = 0, SW shall not insert CAN FD frames for transmission
as this will also result in transmission of error frames.
\begin_inset Float table
placement h
wide false
sideways false
status open
\begin_layout Plain Layout
\noindent
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="5" columns="4">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="17text%">
<column alignment="left" valignment="top" width="10text%">
<column alignment="left" valignment="top" width="10text%">
<column alignment="left" valignment="top" width="52text%">
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Implementation type
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
cellcolor{gray}
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
MODE[FDE]
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
cellcolor{gray}
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
SETTING[PEX]
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
cellcolor{gray}
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Behavior
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
cellcolor{gray}
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Classical CAN
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
When CTU CAN FD detects recessive FDF bit, it responds with error frame.
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
CAN FD tolerant
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
1
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
When CTU CAN FD detects recessive FDF bit, it enters bus integration state.
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
CAN FD enabled
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
1
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
0
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
CTU CAN FD is able to receive / transmit CAN FD frames.
When CTU CAN FD detects recessive value on position of
\begin_inset Quotes eld
\end_inset
res
\begin_inset Quotes erd
\end_inset
bit (one bit after FDF bit), it responds with error frame.
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
CAN FD enabled - with protocol exception
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
1
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
1
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
CTU CAN FD is able to receive / transmit CAN FD frames.
When CTU CAN FD detects recessive value on position of
\begin_inset Quotes eld
\end_inset
res
\begin_inset Quotes erd
\end_inset
bit (one bit after FDF bit), it enters bus integration state.
This configuration tolerates future extensions of CAN FD protocol (e.g.
CAN XL).
\end_layout
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\end_layout
\begin_layout Plain Layout
\noindent
\align center
\begin_inset Caption Standard
\begin_layout Plain Layout
CAN implementation type
\begin_inset CommandInset label
LatexCommand label
name "tab:apb-interface"
\end_inset
\end_layout
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Description
Note When CTU CAN FD is configured as Classical CAN / CAN FD tolerant node
and user attempts to send CAN FD frame (FRAME_FORMAT[FDF_BIT] = 1 in TXT
buffer), it will detect error upon its own transmitted frame.
Therefore SW shall not attempt to send CAN FD frames when CTU CAN FD is
configured as Classical CAN / CAN FD tolerant node.
\end_layout
\begin_layout Description
Note When CTU CAN FD is configured as Classical CAN / CAN FD tolerant node,
SETTINGS[NISOFD] register has no effect.
\end_layout
\begin_layout Subsection
......
......@@ -511,7 +511,7 @@ filename "version.tex"
\noindent
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="7" columns="5">
<lyxtabular version="3" rows="8" columns="5">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="1.5cm">
<column alignment="center" valignment="top" width="3cm">
......@@ -802,7 +802,7 @@ Replace SSP shift register by SSP generator.
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
......@@ -811,7 +811,7 @@ Replace SSP shift register by SSP generator.
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
......@@ -820,7 +820,7 @@ Replace SSP shift register by SSP generator.
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
......@@ -829,7 +829,7 @@ Ondrej Ille
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
......@@ -838,7 +838,7 @@ Ondrej Ille
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
......@@ -854,6 +854,55 @@ Error delimiter too long
Clear non-actual TODOs.
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
0.7
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
2.2
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Ondrej Ille
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
30-04-2020
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Add note about implementation types.
Remove form error on EDL/R0.
Update Protocol control FSM to handle protocol exception.
\end_layout
\end_inset
</cell>
</row>
......@@ -1415,16 +1464,23 @@ literal "false"
\end_inset
.
With regards to this document, CTU CAN FD is
\begin_inset Quotes eld
\end_inset
With regards to this document, CTU CAN FD supports all implementation options
(Classical CAN, CAN FD Tolerant, CAN FD enabled).
Compliance to each of these options can be configured via dedicated register
(therefore behavior can be changed for and existing CTU CAN FD instance).
Reffer to
\begin_inset CommandInset citation
LatexCommand cite
key "key-2"
literal "false"
CAN FD enabled
\begin_inset Quotes erd
\end_inset
implementation.
Support of optional features is described in Table
for description of CTU CAN FD configuration.
\end_layout
\begin_layout Standard
Support of optional features is described in Table
\begin_inset CommandInset ref
LatexCommand ref
reference "tab:iso-optional-features"
......@@ -2141,7 +2197,7 @@ Disabling of protocol exception event on res bit detected recessive
\begin_inset Text
\begin_layout Plain Layout
Not Supported
Supported
\end_layout
\end_inset
......@@ -2150,24 +2206,7 @@ Not Supported
\begin_inset Text
\begin_layout Plain Layout
Detecting
\color red
res
\color inherit
bit following
\color red
FDF
\color inherit
bit is always treated as
\color red
form error
\color inherit
.
No
\color red
protocol exception event
\color inherit
is implemented!
Protocol exception is configurable via SETTINGS[PEX] register.
\end_layout
\end_inset
......@@ -16864,7 +16903,7 @@ status open
\noindent
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="7" columns="2">
<lyxtabular version="3" rows="6" columns="2">
<features tabularvalignment="middle">
<column alignment="left" valignment="middle" width="30.5line%">
<column alignment="left" valignment="top" width="63line%">
......@@ -16986,65 +17025,10 @@ recessive
\color red
form error
\color inherit
is detected.
is detected when SETTINGS[PEX] = '0'.
Recessive bit would mean extending beyond CAN FD standard (CAN XL).
This is not supported.
Protocol exception is not implemented on further extensions beyond CAN
FD protocol.
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\color red
EDL
\color inherit
/
\color red
r0
\color inherit
bit in CAN frames with
\color red
base identifier
\color inherit
.
\color red
EDL
\color inherit
/
\color red
r1
\color inherit
bit in CAN FD frames with
\color red
extended identifier
\color inherit
.
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
If
\color red
recessive
\color inherit
bit is received and CAN FD support is disabled MODE[FDE] = '0',
\color red
form error
\color inherit
is detected.
Recessive bit here indicates CAN FD frame.
When SETTINGS[PEX] = '1', form error is not detected and CTU CAN FD enters
integration.
\end_layout
\end_inset
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -5085,7 +5085,7 @@ cellcolor{cyan}
\end_inset
</cell>
<cell alignment="center" leftline="true" multicolumn="1" rightline="true" topline="true" usebox="none" valignment="top">
<cell alignment="center" leftline="true" multicolumn="1" topline="true" usebox="none" valignment="top">
\begin_inset Text
\begin_layout Plain Layout
......@@ -5141,11 +5141,11 @@ Reserved\end_layout
\end_inset
</cell>
<cell alignment="center" leftline="true" multicolumn="2" rightline="true" topline="true" usebox="none" valignment="top">
<cell alignment="center" leftline="true" multicolumn="1" rightline="true" topline="true" usebox="none" valignment="top">
\begin_inset Text
\begin_layout Plain Layout
Reserved\end_layout
PEX\end_layout