Jump to content
  • 0

Discovery 2 CAN FD separate sampling points for nominal and data phase


drdglbvc

Question

Hi, couldn't find info anywhere on this, so asking new question.

I've recently started using Digilent Discovery 2 as measurement device for drivers development on a automotive chip, in particular CAN FD.

Feature missing for me is configuration for separate sample points for nominal/arbitration phase and data phase. Some industry standards propose usage of different sample points for different phases (also for different baud rates), and inability to configure correct sample points becomes problem for higher data/nominal baud rate ratios.

Is there any way for user to modify existing CAN protocol script, or maybe propose a feature somewhere?

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Something like that, but as far as I understand, bit rate switching and sampling work like this: for BRS bit, if it is set, as soon as sample point is reached (what would've been 25% of nominal bit in this case), we are now switching to using CAN FD timing values, so after sample point, remaining part of BRS impulse is calculated as second 50% of data phase bit width. And also remaining data bits are sampled as one would expect.

In any case, if this is available, I can test it with PCAN, and see what I get.

Link to comment
Share on other sites

  • 0

Hi @attila, thanks!

Sorry for replying so late, didn't set up email notifications, so I forgot a bit...

Tested it, and for larger bit rate differences, it doesn't sample BRS correctly for sample points we are using (defined by some CiA standards documents).

For test, switched to ~50% (PCAN side 50.5% and 55%, AD2 side 51% and 55%) sample points for both data and nominal, and it works.

Illustration example which is not working is defined like this:

- nominal phase bit rate = 200kHz, sample point 80% (T=5us, seg1=4us, seg2=1us)
- data phase bit rate = 2MHz, sample point 75% (T=0.5us, seg1=0.375us, seg2=0.125us)

Expected BRS impulse size = nominal seg1 + data seg 2 = 4.125us, but interpreted bit data shows BRS to be much shorter. (raw pulse length is ~4.1us, measured by free measure tool in waveforms).

I've attached screenshot if that would help.

I can do some raw recording of different bit rate setups over the weekend, if that would help.

waveforms_can.png

Link to comment
Share on other sites

  • 0

Hi @drdglbvc

The next sw version will add (nominal) Sampling option for Protocol/CAN. This, to adjust the BRS bit length to nominal seg1 + data seg 2, if needed.
The interpreter will be also improved for better handing the sampling point for BRS bit.

Thank you for the observation.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...