pcan: pcan_xxxdev_rx(1) failure

This forum covers PCAN-Linux and Linux development issues concerning our products
lepalom
Posts: 15
Joined: Mon 16. Mar 2015, 17:22

Re: pcan: pcan_xxxdev_rx(1) failure

Post by lepalom » Mon 29. May 2017, 12:28

Done!!!!
Attachments
pcan.txt
(55.65 KiB) Downloaded 588 times

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

Re: pcan: pcan_xxxdev_rx(1) failure

Post by S.Grosjean » Mon 29. May 2017, 13:08

Hi,

It looks like you're always receiving these CAN messages every 3 ms from the bus:

id=979 len=8
id=980 len=8
id=981 len=8
id=982 len=8

Could you first check if it's normal.

Next, with such a high frequency of reception, you could try to increase the Rx fifo size of the driver, with adding the module arg "rxqsize" to the modprobe options parameter. For example, to setup a size of 5000 entries (instead of 500 which is the default value):

Code: Select all

$ sudo vi /etc/modprobe.d/pcan.conf

# pcan - automatic made entry, begin --------
# if required add options and remove comment
options pcan rxqsize=5000
install pcan /sbin/modprobe --ignore-install pcan
# pcan - automatic made entry, end ----------
(you should rmmod then modprobe pcan to handle this change).

Next, be sure that your application is able to process more than 1 msg/ms.

Regards,

Stéphane
— Stéphane

lepalom
Posts: 15
Joined: Mon 16. Mar 2015, 17:22

Re: pcan: pcan_xxxdev_rx(1) failure

Post by lepalom » Mon 29. May 2017, 13:35

S.Grosjean wrote:Hi,

It looks like you're always receiving these CAN messages every 3 ms from the bus:

id=979 len=8
id=980 len=8
id=981 len=8
id=982 len=8

Could you first check if it's normal.
Yes, it's normal. We try to make some control.

Next, with such a high frequency of reception, you could try to increase the Rx fifo size of the driver, with adding the module arg "rxqsize" to the modprobe options parameter. For example, to setup a size of 5000 entries (instead of 500 which is the default value):
done
Next, be sure that your application is able to process more than 1 msg/ms.
Yes, it worked before.

Now, with your proposed changes is working again. Also, I have decreased the period time to 5 ms (with 3 ms, didn't work). In any case, I will investigate further. Thanks, thanks, thanks. You got me a big light in this issue.

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

Re: pcan: pcan_xxxdev_rx(1) failure

Post by S.Grosjean » Mon 29. May 2017, 14:25

Hi,
Next, be sure that your application is able to process more than 1 msg/ms.

Yes, it worked before.
Yep, but you also said that you did some updates... Your application was certainly able to handle such a bus load in your previous environment, while it isn't anymore...
Now, with your proposed changes is working again. Also, I have decreased the period time to 5 ms (with 3 ms, didn't work). In any case, I will investigate further. Thanks, thanks, thanks. You got me a big light in this issue.
Ok. Don't forget to rebuild (and install) the driver WITHOUT any DBG option.

Regards,

Stéphane
— Stéphane

Post Reply