Page 1 of 1

PCIe FD Read Timing Issue, simultaneous frames?

Posted: Tue 8. Sep 2020, 22:30
by phammer
I am using a mini PCIe FD card and am having a read timing bug.

Generating periodic test traffic on my bus a 1Khz but when I read the frames in userspace using the socket can api, the frames arrive two at a time every 2ms. I used the socket control message to check the timestamp which shows the correct timing of every 1ms.

My system config:
Linux 4.14.52 w RT-preempt
Ubuntu 18.04.1 LTS
peak-linux-driver-8.10.2

Possibly related: I tried enabling msi with modprob but was unable to get the resulting irqs to change

Code: Select all

modprobe pcan options pcan fdusemsi=1

Re: PCIe FD Read Timing Issue, simultaneous frames?

Posted: Wed 9. Sep 2020, 09:09
by S.Grosjean
Hi,

It's not possible to pass module parameters via the modprobe command (see modprobe --help). Use /etc/modprobe.d/pcan.conf instead.

Try to add the below line to "/etc/modprobe.d/pcan.conf":

Code: Select all

options pcan fdirqtl=5
"fdirqtl" pcan module parameter control the maximum delay of IRQ notification (default is 10).

if you also want to use the MSI mode, type:

Code: Select all

options pcan fdirqtl=5 fdusemsi=1
Then, remove and reload the pcan module with:

Code: Select all

$ sudo rmmod pcan
$ sudo modprobe pcan
Regards,

Re: PCIe FD Read Timing Issue, simultaneous frames?

Posted: Wed 9. Sep 2020, 20:29
by phammer
Thank you very much for the support! Adding fdirqtl=5 seems to have solved my issue.

I would suggest you add/document that option in section 3.3 of the PCAN-Driver-Linux_UserMan_eng.pdf