Achieving high throughput with PCAN-USB

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
ti_user
Posts: 2
Joined: Thu 30. Jan 2020, 16:41

Achieving high throughput with PCAN-USB

Post by ti_user » Thu 30. Jan 2020, 17:06

Hi,
We are using PCAN-USB tool and trying to achieve high throughput in FD mode for testing. Here are my settings

1. Bitrate : 1Mbps
2. Data bitrate : 5Mbps
3. Speed : 80Mhz
4. Payload : 64B
5. Tool : Modified pcanfdtst tool with peak-linux-driver-8.9.3 on standard Ubuntu 16.04. (Core i5 machine)

However, I am only able to achieve 1500 msg/sec even after removing usleep. I tried the default application as well but no luck.

Here is the command that I ran

Code: Select all

./pcanfdtst tx --bitrate 1000000 --dbitrate 5000000 --clock 80000000 -n 1 -ie 0xD0 --fd -l 64 --tx-pause-us 1 /dev/pcanusbfd32
My questions are :

1. What is the max achievable throughput with PCAN-USB tool ?
2. What is the recommended approach for getting maximum throughput ? Can I use examples or do I have to write my own code with API's ?
3. I downloaded the API guide and in examples, I found the comment that RT kernel is not supported with USB. Is that correct ?

Regards

User avatar
S.Grosjean
Software Development
Software Development
Posts: 357
Joined: Wed 4. Jul 2012, 17:02

Re: Achieving high throughput with PCAN-USB

Post by S.Grosjean » Fri 31. Jan 2020, 11:09

Hi,

64 data bytes with all '1' generate 102 additional bits for stuffing.
With a nominal bitrate set to 1Mbps, you theoretically reaches a throughput of (1000000 / (64 + 512 + 102)) ~1475 msg/s.

Note: without setting BRS, the data bitrate is useless.

With --brs:

Code: Select all

$  pcanfdtst tx --bitrate 1000000 --dbitrate 5000000 --clock 80000000 -n 15000 -ie 0xD0 --fd --brs -l 64 --tx-pause-us 1 -p 0 /dev/pcanusbfd36
takes about ~2.755 s to transfer.

Regards,
— Stéphane

ti_user
Posts: 2
Joined: Thu 30. Jan 2020, 16:41

Re: Achieving high throughput with PCAN-USB

Post by ti_user » Mon 10. Feb 2020, 16:23

Thanks.
--brs was the issue.

Regards

Post Reply