Odd behavior with PCAN-USB FD in BRS mode

CAN FD Interface for High-Speed USB 2.0

Odd behavior with PCAN-USB FD in BRS mode

Postby rounin » Thu 31. Jan 2019, 10:03

Hi,

I'm seeing some odd behavior with the CAN-USB FD, hopefully someone can help tell if this is expected or not:

I'm trying to send a packet from PCAN-USB FD -> my device (STM32H750 + ADM3055E), in CAN FD BRS mode, nominal bit rate 1Mbps, data rate 4 Mbps.

I'm seeing what looks like an error frame being sent from the PCAN-USB FD (#1, 6us dominant), followed by an error frame from my board (#2, up to a few times, before my controller times out and stops responding).

errorframe.jpg
errorframe.jpg (55.59 KiB) Viewed 178 times


This only seems to happen in CAN FD BRS mode, normal CAN seems to work fine, as well as non-BRS CAN FD.

I attached a screen grab and a Saleae Logic Analyzer grab, on my board's TTL side. RX is my RX, TX is my board's ack and error. There is an earlier good packet in the logic trace.

Sending from my board to the peak works reliably in all modes but FD BRS, and sometimes works in BRS mode. STD ids seem to work better than extended. Sometimes a EXT id packet will be received after trying 20-30 times, I attached a trace of that as well as pcanusbfd_rx_after_many_tries.

I'm confused why the PEAK would drive low for 6 bit times - I don't think there would be any reason for it to send an error, I'm not sure if something is wrong on my side.

Physical wiring is about 6-8 inches of loosely twisted (uncontrolled) wire, split termination installed on my board, feed-through grid connect branded Dsub termination on the PCAN side. I've played with the loop delay compensation on my side for transmission without much behavior change.

Any ideas would be helpful, thanks!
Attachments
pcanusbfd_rx_after_many_tries.logicdata.zip
(5.54 KiB) Downloaded 8 times
errorframe2.logicdata.zip
(3.94 KiB) Downloaded 9 times
errorframe.logicdata.zip
(3.36 MiB) Downloaded 7 times
rounin
 
Posts: 3
Joined: Thu 31. Jan 2019, 09:34

Re: Odd behavior with PCAN-USB FD in BRS mode

Postby U.Wilhelm » Thu 31. Jan 2019, 11:32

First of all we need to know the used PEAK CAN-FD Firmware on this module. Please check if it is the latest Firmware, and that the modul is switched to the mode your µC work (CAN FD ISO-mode or maybe a older CAN-FD non-ISO unit).
This could be done in PCAN-View - TAB PCAN-USB FD. There you also find the used Firmware Version:

USB-FD_Info.jpg
USB-FD_Info.jpg (58.2 KiB) Viewed 169 times

The latest Firmware is part of the Product DVD - please see online copy - Section Firmware - PCAN-USB Device - PCAN-USB FD.
--------------------------------
PEAK-System Technik
Technical Support Team
support@peak-system.com
-------------------------------
User avatar
U.Wilhelm
Sales & Support
Sales & Support
 
Posts: 956
Joined: Fri 10. Sep 2010, 18:34
Location: Darmstadt

Re: Odd behavior with PCAN-USB FD in BRS mode

Postby rounin » Fri 1. Feb 2019, 04:11

The PCAN-USB FD is at firmware version 3.2.0. The driver version is 4.1.4. This appears to be the latest version.

Both my device and the PCAN-USB FD are set to FD ISO mode. I am able to send non-BRS FD frames. If I disable FD ISO mode on the PCAN side, the FD frames fail to send, so I am confident we are both on ISO mode.
rounin
 
Posts: 3
Joined: Thu 31. Jan 2019, 09:34

Re: Odd behavior with PCAN-USB FD in BRS mode

Postby U.Wilhelm » Fri 1. Feb 2019, 09:14

Looks like your BRS Data Timing is not 100% identical on your device and on our PCAN-USB FD.
Please check the EXACT Timings and try again. In PCAN-View you could select hundreds of combinations for your Nominal/BRS Data you use - you need to be 100% sure how it works and that you setup both ends identical !
See screen - the default 4MBit (red arrow) are complete differnet from the one i have created in this sample
But--> YOU need to know the Timings of YOUR µC Board and neet to setup on the PCAN-USB the same timing.
Attachments
USB-FD_Info_BRS.JPG
Build your own Timings for Bitrates that fix to your Environment
USB-FD_Info_BRS.JPG (84.54 KiB) Viewed 153 times
--------------------------------
PEAK-System Technik
Technical Support Team
support@peak-system.com
-------------------------------
User avatar
U.Wilhelm
Sales & Support
Sales & Support
 
Posts: 956
Joined: Fri 10. Sep 2010, 18:34
Location: Darmstadt

Re: Odd behavior with PCAN-USB FD in BRS mode

Postby G.Bohlen » Fri 1. Feb 2019, 10:03

Hello rounin,

it is very importatnt that you select the same Samplepoint in the arbitartion bitrate (nominal bitrate) on all devices.
Bit rate switch takes place at the sample point (NOT at the end of the bit), and if you have different sample points the devices get out of sync.
We would recommend that you use the same CAN core clock in the microcontroller (80MHz or 40MHz for 4MBit/s) and the same bit rate prescaler on all connected CAN devices.

Regard,
Gunnar Bohlen
User avatar
G.Bohlen
Hardware Development
Hardware Development
 
Posts: 31
Joined: Wed 22. Sep 2010, 20:38

Re: Odd behavior with PCAN-USB FD in BRS mode

Postby rounin » Sat 2. Feb 2019, 06:34

Hi,

Thanks for the advice to set the sample points the same, that helped a lot. I set the tseg1/2, sjw, and prescalers the same and I am now able to send to the peak and have BRS packets show up in the GUI, I haven't tested a bunch but it seems pretty good. I was having issues going from peak -> my device for a while, but re-reading what you said I realized I need to match both the nominal tseg settings and the data rate tseg settings otherwise I would switch at the wrong time too :oops: .

It makes a lot more sense now that I know the bit rate changes at the sample point. I'll make sure to make the tsegs/sample point configurable in my device, not just the bit rate.

Few hundred 400,000 BRS packets sent now! Feeling pretty hopeful that it is working now :D
rounin
 
Posts: 3
Joined: Thu 31. Jan 2019, 09:34


Return to PCAN-USB FD



This website uses cookies for analytics, for logins to the online shop and the forum, and for the handling of an order. By browsing this website you agree to the use of cookies. Detailed information on their use can be found in our privacy policy.

OKPrivacy Policy