2025-11-14 8:03 AM
Heyho,
after some *** CAN beginner mistakes on my side, I got the FDCAN BRS 8 Mbit working.
Or so I thought. It's only working between my custom boards, as I found out after connecting a Kvaser Leaf v3.
With the Kvaser (directly connected to the board's D-sub, termination on, signals on the scope look good (enough)) and BRS on, it only works with max 2 Mbit, and only if the Kvaser's bit timing is set below 70% sampling point.
So far I played with changes to TDC, sampling point, SJW, and all bit timings (checked the Kvaser timing website).
Any ideas welcome!
Solved! Go to Solution.
2025-11-17 10:47 PM - edited 2025-11-17 10:51 PM
Problem solved, Kvaser replied, saying that definitely 2 terminating resistors are needed on the bus, and:
When using CAN FD it is extremely important that ALL nodes on the CAN bus use exactly the same settings.
That was it, I didn't know that. I thought the sampling point might be something device / interface / endpoint specific.
Luckily I made all bus parameters editable (via http PUT), so when setting the sampling point to exactly the Leaf's settings, it works.
Thanks to @mƎALLEm and to Kvaser for the quick replies! :)
Edit:
Interestingly, the settings must be the same not only for the BRS data phase, but also for the arbitration phase.
Without BRS it didn't really matter where each side's sampling point was.
2025-11-14 8:08 AM - edited 2025-11-14 8:08 AM
So it's a "Kvaser" issue as FDCAN BRS 8 Mbit is working between your custom boards.
Did you remove the terminating resistor inside that Kvaser device? you need only two terminating resistors on the CAN lines.
2025-11-14 8:16 AM
Thanks for the quick answer!
I only have the Kvaser connected to one of my boards.
The termination resistor is switchable on my boards (with an isolated low capacitance opto relay).
2025-11-14 9:21 AM
Do you confirm FDCAN is working well between the boards without that kvaser device?
2025-11-17 3:36 AM
> Do you confirm FDCAN is working well between the boards without that kvaser device?
Yes, at all bit rates.
Scope confirms bit timings.
I thought that the Kvaser stuff - coming from the market leader (I think) - is the impeccable reference.
So maybe I got something wrong?
Here's the CAN register settings for 8M (hex):
(for the segment times below the complete register, e.g. DTSEG1, the "+1" is already included)
FDCAN 1->
Clock = 80.000 MHz - PLL 1 Q
CREL = 32141218
ENDN = 87654321
DBTP = 00800521
TDC = 1
DBRP = 1
DTSEG1 = 6
DTSEG2 = 3
DSJW = 2
NBTP = 24008A13
NBRP = 1
NTSEG1 = 139
NTSEG2 = 20
NSJW = 19
TEST = 00000080
RWD = 00000000
CCCR = 00004300
INIT = 0
CCE = 0
ASM = 0
CSA = 0
CSR = 0
MON = 0
DAR = 0
TEST = 0
FDOE = 1
BRSE = 1
PXHD = 0
EFBI = 0
TXP = 1
NISO = 0
TSCC = 00000001
TSCV = 0000BA51
TOCC = 0000FFFF
TOCV = 0000FFFF
ECR = 00000000
PSR = 0000070F
GFC = 00000007
2025-11-17 3:52 AM
@LCE wrote:
> Do you confirm FDCAN is working well between the boards without that kvaser device?
Yes, at all bit rates.
So that's not a STM32 issue, that's "kvaser" related one which I cannot help you on that.
Check again your kvaser device config, your wiring etc ..
2025-11-17 4:04 AM
A question: What is the clock source of PLL1Q? HSE?
Are you using a crystal?
If not, please use HSE as source clock for PLL1Q and use crystal (XTAL) or crystal oscillator (XO).
2025-11-17 4:08 AM
HSE, ultra stable 10 ppm crystal
PTP running on that successfully, lots of timing relevant stuff in that application.
2025-11-17 4:57 AM - edited 2025-11-17 5:08 AM
According to "Kvaser Leaf v3" specification, it can reach up to 8Mbit/s
So it should work.
Still not clear about the terminating resistor inside that device. Ensure that -if available- the internal terminating resistor on that kvaser device is disconnected.
What about the configuration of the tool: the bitrate the mode.. etc ?
Or raise a support ticket to kvaser over this link: https://kvaser.com/support/
2025-11-17 6:37 AM
> terminating resistor inside that device
I don't want to fiddle with the Kvaser hardware.
And as I said: there's a switchable terminating resistor on my board, and when that one is turned off, not even non-BRS is working.