Re: [PATCH v5 2/7] can: bittiming: allow TDC{V,O} to be zero and add can_tdc_const::tdc{v,o,f}_min

From: Marc Kleine-Budde
Date: Tue Aug 17 2021 - 05:43:16 EST


On 16.08.2021 16:30:52, Marc Kleine-Budde wrote:
> > Finally, I did a bit of research and found that:
> > http://ww1.microchip.com/downloads/en/DeviceDoc/Section_56_Controller_Area_Network_with_Flexible_Data_rate_DS60001549A.pdf

> > This is *not* the mcp25xxfd datasheet but it is still from
> > Microship and as you will see, it is mostly similar to the
> > mcp25xxfd except for, you guessed it, the TDCO.
> >
> > It reads:
> > | TDCMOD<1:0>: Transmitter Delay Compensation Mode bits
> > | Secondary Sample Point (SSP).
> > | 10 = Auto; measure delay and add CFDxDBTCFG.TSEG1; add TDCO
> > | 11 = Auto; measure delay and add CFDxDBTCFG.TSEG1; add TDCO
> > | 01 = Manual; Do not measure, use TDCV plus TDCO from the register
> > | 00 = Disable
> >
> > | TDCO<6:0>: Transmitter Delay Compensation Offset bits
> > | Secondary Sample Point (SSP). Two's complement; offset can be
> > positive, zero, or negative.
> > | 1111111 = -64 x SYSCLK
> > | .
> > | .
> > | .
> > | 0111111 = 63 x SYSCLK
> > | .
> > | .
> > | .
> > | 0000000 = 0 x SYSCLK
> >
> > Here, you can clearly see that the TDCO has the exact same range
> > as the one of the mcp25xxfd but the description of TDCMOD
> > changes, telling us that:
> >
> > | SSP = TDCV (measured delay) + CFDxDBTCFG.TSEG1 (sample point) + TDCO
> >
> > Which means this is a relative TDCO.

Good catch! Microchip is investigating this.

regards,
Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature