[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOprWotBRv_cvD3GCSe7N2tiLooZBoDisSwbu+VBAmt_2izvwQ@mail.gmail.com>
Date: Mon, 22 Dec 2025 22:17:13 +0800
From: Andrea Daoud <andreadaoud6@...il.com>
To: Pavel Pisa <pisa@....felk.cvut.cz>, Marc Kleine-Budde <mkl@...gutronix.de>, linux-can@...r.kernel.org
Cc: Wolfgang Grandegger <wg@...ndegger.com>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>, netdev@...r.kernel.org,
Ondrej Ille <ondrej.ille@...il.com>
Subject: ctucanfd: possible coding error in ctucan_set_secondary_sample_point
causing SSP not enabled
Hi,
In ctucan_set_secondary_sample_point(), there's a line which runs when
data bitrate is >1Mbps:
ssp_cfg |= FIELD_PREP(REG_TRV_DELAY_SSP_SRC, 0x1);
In the datasheet [1] of ctucanfd, we can see the meaning of SSP_SRC:
SSP_SRC: Source of Secondary sampling point.
0b00 - SSP_SRC_MEAS_N_OFFSET - SSP position = TRV_DELAY (Measured
Transmitter delay) + SSP_OFFSET.
0b01 - SSP_SRC_NO_SSP - SSP is not used. Transmitter uses regular
Sampling Point during data bit rate.
0b10 - SSP_SRC_OFFSET - SSP position = SSP_OFFSET. Measured
Transmitter delay value is ignored.
Therefore, setting it to 1 disables SSP (NO_SSP). We should probably
set it to 0 (MEAS_N_OFFSET).
Is this correct? Would like to hear some inputs.
Regards,
Andrea
[1]: https://canbus.pages.fel.cvut.cz/ctucanfd_ip_core/doc/Datasheet.pdf
Powered by blists - more mailing lists