]> rtime.felk.cvut.cz Git - sojka/can-utils.git/commit
can-calc-bit-timing: improve printing of bit timing parameters
authorMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 20 Jul 2010 13:43:12 +0000 (13:43 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 20 Jul 2010 13:43:12 +0000 (13:43 +0000)
commit26488b16e6deb2ff97643c7b02ce4342fd2143fe
tree7476640e2819cda06f00edbe210ddbc0aed7c0e9
parentccd199739ec5ab7339c29b2dbe8049a7997980f3
can-calc-bit-timing: improve printing of bit timing parameters

This patch adds additional fields when printing the bit timing
parameters. Now the real bitrate the nominal and the real sample point
as well as the error of the sample point is displayed.

The output now looks like this:

Bit timing parameters for at91 with 100.000000 MHz ref clock
nominal                                 real Bitrt   nom  real SampP
Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error     CAN_BR
1000000     50   7    7    5   1   5 1000000  0.0% 75.0% 75.0%  0.0% 0x00040664
 800000     50   8    8    8   1   5  800000  0.0% 80.0% 68.0% 15.0% 0x00040777
 500000    100   8    8    3   1  10  500000  0.0% 87.5% 85.0%  2.9% 0x00090772
 250000    250   6    7    2   1  25  250000  0.0% 87.5% 87.5%  0.0% 0x00180561
 125000    500   6    7    2   1  50  125000  0.0% 87.5% 87.5%  0.0% 0x00310561
 100000    500   8    8    3   1  50  100000  0.0% 87.5% 85.0%  2.9% 0x00310772
  50000   1250   6    7    2   1 125   50000  0.0% 87.5% 87.5%  0.0% 0x007c0561
  20000 ***bitrate not possible***
  10000 ***bitrate not possible***

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
can-calc-bit-timing.c