CAN Samplepoint

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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


Re: CAN Samplepoint

Quoted text here. Click to load it

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 ( snipped-for-privacy@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Re: CAN Samplepoint
Quoted text here. Click to load it

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


Re: CAN Samplepoint
Quoted text here. Click to load it

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


Re: CAN Samplepoint
Quoted text here. Click to load it


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.

Quoted text here. Click to load it

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 ( snipped-for-privacy@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Site Timeline