RE: Question about CAN Controller bit timing logic
Ryan Pannell <[email protected]> Mon, 10 Feb 2020 18:11:59 +0000
| Newsgroups | gmane.comp.hardware.bus.can |
|---|---|
| Message-ID | <[email protected]> |
--_000_7AB137701821F94BAF7B06C1747BA691013B125DBBOS01oslocal_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi Rocky,
>> I am interested in hardware part about CAN Controller Data
>> Synchronization, so could you tell me how does the Bit Time Logic
>> detect the phase difference and convert the phase difference into
>> exact number of TQs(Time Quanta) to help CAN controller synchronize
>> the Data?
There are 2 types of synchronisation - hard synchronisation and re-synchron=
isation.
Hard synchronisation is performed at the start of frame, when the start of =
frame bit goes from recessive to dominant state.
It is subsequently re-synchronised when a bit changes from recessive to dom=
inant state outside the synchronisation segment, at which point the control=
ler will adjust the segment length to compensate.
Within the controller, synchronisation is usually handled by a DPLL, which =
basically compares the actual position of a bit edge to the expected edge a=
nd adjust the bit time as necessary.
There are a few documents that go into the topic in more detail, such as:
* Bosch CAN Specification Version 2.0
* ISO 11898
* NXP AN1798
* Microchip AN754
* Kvaser have several PDFs and even videos, I believe
* Google is your friend
I hope this helps.
Best,
Ryan
--_000_7AB137701821F94BAF7B06C1747BA691013B125DBBOS01oslocal_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1133711763;
mso-list-type:hybrid;
mso-list-template-ids:-256742628 -711711254 134807555 134807557 134807553 =
134807555 134807557 134807553 134807555 134807557;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-font-family:Calibri;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-GB" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US">Hi Rocky,=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US"><o:p>&nbs=
p;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US">>> =
</span><span lang=3D"EN-US">I am interested in hardware part about CAN Cont=
roller Data
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">>> Synchronization, =
so could you tell me how does the Bit Time Logic
<br>
>> detect the phase difference and convert the phase difference into =
<br>
>> exact number of TQs(Time Quanta) to help CAN controller synchroniz=
e <br>
>> the Data?<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US"><o:p>&nbs=
p;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US">There are=
2 types of synchronisation – hard synchronisation and re-synchronisa=
tion.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US">Hard sync=
hronisation is performed at the start of frame, when the start of frame bit=
goes from recessive to dominant state.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US">It is sub=
sequently re-synchronised when a bit changes from recessive to dominant sta=
te outside the synchronisation segment, at which point the controller will =
adjust the segment length to compensate.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US"><o:p>&nbs=
p;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US">Within th=
e controller, synchronisation is usually handled by a DPLL, which basically=
compares the actual position of a bit edge to the expected edge and adjust=
the bit time as necessary.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US"><o:p>&nbs=
p;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US">There are=
a few documents that go into the topic in more detail, such as:<o:p></o:p>=
</span></p>
<ul style=3D"margin-top:0cm" type=3D"disc">
<li class=3D"MsoListParagraph" style=3D"margin-left:0cm;mso-list:l0 level1 =
lfo1"><span style=3D"mso-fareast-language:EN-US">Bosch CAN Specification Ve=
rsion 2.0<o:p></o:p></span></li><li class=3D"MsoListParagraph" style=3D"mar=
gin-left:0cm;mso-list:l0 level1 lfo1"><span style=3D"mso-fareast-language:E=
N-US">ISO 11898<o:p></o:p></span></li><li class=3D"MsoListParagraph" style=
=3D"margin-left:0cm;mso-list:l0 level1 lfo1"><span style=3D"mso-fareast-lan=
guage:EN-US">NXP AN1798<o:p></o:p></span></li><li class=3D"MsoListParagraph=
" style=3D"margin-left:0cm;mso-list:l0 level1 lfo1"><span style=3D"mso-fare=
ast-language:EN-US">Microchip AN754<o:p></o:p></span></li><li class=3D"MsoL=
istParagraph" style=3D"margin-left:0cm;mso-list:l0 level1 lfo1"><span style=
=3D"mso-fareast-language:EN-US">Kvaser have several PDFs and even videos, I=
believe<o:p></o:p></span></li><li class=3D"MsoListParagraph" style=3D"marg=
in-left:0cm;mso-list:l0 level1 lfo1"><span style=3D"mso-fareast-language:EN=
-US">Google is your friend<o:p></o:p></span></li></ul>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US"><o:p>&nbs=
p;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US">I hope th=
is helps.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US"><o:p>&nbs=
p;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US">Best,<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"mso-fareast-language:EN-US">Ryan<o:p>=
</o:p></span></p>
</div>
</body>
</html>
--_000_7AB137701821F94BAF7B06C1747BA691013B125DBBOS01oslocal_--
--
Archives and useful links: http://groups.yahoo.com/group/CANbus
Subscribe and unsubscribe at www.vector.com/canlist/
Report any problems to <[email protected]>