CAN Samplepoint
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
CAN Samplepoint

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
woko
Guest





Posted: Fri Dec 09, 2005 5:15 pm    Post subject: CAN Samplepoint Reply with quote

Hi,

I'm currently investigating about the impact of the samplepoint (SP) to
the CAN-buslength with 1Mbit baudrate because we can see some
errorframes in our machine.

On my desk I have a simple CAN-Network with 3 CAN-controllers:
2x Tms320LF2407 and
1x SJA1000 and lots of pieces of cable.

In the past we set the controllers with 60% SP in TMS320LF2407 and 75%
SP in SJA1000. To improve the cablelength, I tried to increase the SP
in TI, which worked out like expected.
I played around with the SP in both controllers (TABLE1) and found an
ideal setup with 87% for TI and 75-80% for SJA1000. If I did not made
any mistake in the calculation (I checked it twice) I find it a quite
strange result!

Does anybody can explain such a behaviour?

Regards,

Wolfgang Kopp

TABLE1 reached cable length without errorframe at high busload:

SJA_SP
75% 80% 87%
TI_SP 60% 10m
73% 18,8m 20,6m
80% 24,4m 22,4m 17m
87% 28,1m 28,1m 18,8m
Back to top
Hans-Bernhard Broeker
Guest





Posted: Fri Dec 09, 2005 5:15 pm    Post subject: Re: CAN Samplepoint Reply with quote

woko <wkopp@gmx.net> wrote:

Quote:
I'm currently investigating about the impact of the samplepoint (SP) to
the CAN-buslength with 1Mbit baudrate because we can see some
errorframes in our machine.

The direct influence is quite straight forward: the later you sample,
the longer the cable can be. But there are other effects that can
disfavour late sampling, most prominently clock frequency differences.

The quoted percentages of bit times suggest you have different t_qu
times on your two types of devices (75% --> 8 t_qu = 1 us, 60% and 73%
are incompatible with that). That could be making things worse. Try
to do look at this in terms of actual bit segment times (t_SEG1,
t_SEG2, and keep an eye on t_SJW), instead of somewhat meaningless
percentages.

Any useful textbook on CAN will have more details for you.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Back to top
woko
Guest





Posted: Mon Dec 12, 2005 9:15 am    Post subject: Re: CAN Samplepoint Reply with quote

Quote:
Any useful textbook on CAN will have more details for you.

In our book only the principle of the timing is explained. The meaning
of late sampling and the size of the SJW is not handled.

In all of our controllers we use quite exact oscillators for the
timing. So we could set SJW smaller? Currently SJW is set to 375ns,
even bigger than TSEG2 (250ns)! Which factors should also be considered
for SJW?

Regards,

Wolfgang Kopp
Back to top
PeteS
Guest





Posted: Mon Dec 12, 2005 3:21 pm    Post subject: Re: CAN Samplepoint Reply with quote

woko wrote:
Quote:
Any useful textbook on CAN will have more details for you.

In our book only the principle of the timing is explained. The meaning
of late sampling and the size of the SJW is not handled.

In all of our controllers we use quite exact oscillators for the
timing. So we could set SJW smaller? Currently SJW is set to 375ns,
even bigger than TSEG2 (250ns)! Which factors should also be considered
for SJW?

Regards,

Wolfgang Kopp

CAN is a relatively low speed bus that can be physically quite large.
ISO 11898 is the relevant standard for signaling.

As the bus grows significantly, the transition time of the signals
grows. At the receiver, one needs (quite reasonably) to have the
differential signal valid.
For some arbitrary bus length, with some fixed rise/fall time, there
will be a minimum time after the transmission before the signal at the
receiver has reached valid levels.
As the frequency of operation is increased, the sample point position,
as a percentage of bit time, wil increase. Indeed, the limiting factor
on speed is the issue of the signal at the receiver not having
sufficient time to become valid.

So it is no surprise that as the frequency of operation increases, the
sample point as a percentage of bit time also increases.

If you read the datasheet for a typical CAN bus driver, you'll get this
basic information.

As a sample (there are a number of vendors at the physical layer) try:
http://focus.ti.com/docs/prod/folders/print/sn65hvd251.html

Cheers

PeteS
Back to top
Hans-Bernhard Broeker
Guest





Posted: Mon Dec 12, 2005 3:27 pm    Post subject: Re: CAN Samplepoint Reply with quote

woko <wkopp@gmx.net> wrote:
Quote:
Any useful textbook on CAN will have more details for you.

In our book only the principle of the timing is explained.

Then you must have selected a useless one ;-). The one edited by
Wolfhard Lawrenz (3-7785-2780-0) explains a good deal more about this.

Quote:
In all of our controllers we use quite exact oscillators for the
timing. So we could set SJW smaller? Currently SJW is set to 375ns,
even bigger than TSEG2 (250ns)!

That doesn't make sense. t_SJW may not be longer than t_SEG2. One of
two uses of SJW is to change the lengt of SEG2 to (t_SEG2-t_SJW). But
a negative length of the SEG2 is clearly nonsensical --- it would mean
you sample outside the bit time.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB