cancel
Showing results for 
Search instead for 
Did you mean: 

FDCAN H7 BRS failure with Kvaser Leaf 3

LCE
Principal II

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!

16 REPLIES 16
LCE
Principal II

@mƎALLEm  I just checked the Kvaser manual, the Leaf v3 does not have terminating resistor.

LCE_0-1763390292655.png

So I'll add another one...


@LCE wrote:

@mƎALLEm  I just checked the Kvaser manual, the Leaf v3 does not have terminating resistor.

So I'll add another one...


If you have already two terminating resistors of 120ohm on the bus you shouldn't.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
LCE
Principal II

I only had the Kvaser and my device on the bus, so only one R.

With 2 Rs still the same.

I'll contact Kvaser, thanks for the link!

LCE
Principal II

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.

Thank you @LCE  for coming back with this.

But still not understand why the sample point should be the same. Each node is seeing the bit not the sample point on the bus ! Even if it works for you I'm still not totally convinced ;).

In this github example CKB-STM32-FDCAN-8Mbs , I used 6 nodes communicating at 8Mb/s, each node has its own sample point position and all nodes are working well on the same bus!

Anyway, this is something that needs to be explained..

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
LCE
Principal II
Kvaser wrote:

On regular CAN CC (Classic CAN), the SP is important, but you can mix it a bit on the BUS, because it is only the interface LISTENING that uses this number.

But on CAN FD, the change of speed, is done in the SP. The SP is a mathematical defined point, and you can not observe it on a oscilloscope.

With that said, it is important that the SENDER and the RECEIVERS switches speed at the same time, otherwise they will be out of sync.

Even if you not have the same SP everywhere, the CAN bus is forgiving and will try to help you to fix the problem. It will re-synchronize as good as possible, but sometimes they get our of sync and you will get errors.

But if you instead uses EXACTLY the same parameter on all nodes, then the “resync mechanism” will be used for adjusting from sporadic errors and noise, and will save you from non wanted events. It will give you a safe CAN bus.

What if it not is possible to use the same settings?

Biggest problem is a mix of clock frequencies on the different nodes. If you have nodes that uses 40 or 80 MHz clocks, then it easy to find common parameters. But if you also have nodes with 30 or 60MHz, then it can be more problematic to find common settings.


@mƎALLEm