Marc Kleine-Budde 44a2900bd8 can-calc-bit-timing: better sample point calculation
This patch tries to optimize the calculation of the sample point. To
understand what it does have a look at the original implementation.

If there is a combination of timing parameters where both the bitrate
and sample point error are 0 the current implementation will find it.

However if the reference clock doesn't allow an optimal bitrate (this
means the bitrate error is always != 0) there might be several timing
parameter combinations having the same bitrate error. The original
implementation will allways choose the one with the highest brp. The
actual sample point error isn't taken into account.

This patch changes the algorithm to minimize the sample point error,
too. Now a brp/tseg combination is accepted as better if one of these
condition are fulfilled:
1) the bit rate error must be smaller, or
2) the bit rate error must be equal and
   the sample point error must be equal or smaller

If a smaller bit rate error is found the sample point error is reset.
This ensures that we first optimize for small bit rate error and then
for small sample point errors.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-04-13 13:13:01 +02:00
2010-04-19 12:12:18 +00:00
2015-03-06 10:02:35 +01:00
2014-07-02 16:03:34 +02:00
2012-11-14 20:57:16 +01:00
2014-01-31 11:52:15 +01:00
2015-09-03 17:24:21 +02:00
2015-07-22 21:12:44 +02:00
2012-11-14 20:57:16 +01:00
2015-09-04 11:16:17 +02:00
2015-10-15 10:18:15 +02:00
2012-11-14 20:57:16 +01:00

SocketCAN userspace utilities and tools

CAN is a message-based network protocol designed for vehicles originally initially created by Robert Bosch GmbH. SocketCAN is a set of open source CAN drivers and a networking stack contributed by Volkswagen Research to the Linux kernel.

This package contains some userspace utilities for Linux SocketCAN subsystem: asc2log, bcmserver, canbusload, can-calc-bit-timing, candump, canfdtest, cangen, cangw, canlogserver, canplayer, cansend, cansniffer, isotpdump, isotprecv, isotpperf, isotpsend, isotpserver, isotpsniffer, isotptun, log2asc, log2long, slcan_attach, slcand and slcanpty.


Description copied from https://packages.debian.org/sid/can-utils

S
Description
Linux-CAN / SocketCAN user space applications
Readme
2.9 MiB
Languages
C 98.1%
CMake 0.7%
Makefile 0.6%
Shell 0.5%