PCAN PCI Channel Init Causes Stuff & Form Errors on the Bus

This forum covers issues concerning multiple software products.
Post Reply
fenasikerim
Posts: 12
Joined: Fri 8. Nov 2024, 11:16

PCAN PCI Channel Init Causes Stuff & Form Errors on the Bus

Post by fenasikerim » Tue 18. Feb 2025, 11:51

Hello,

I am using two Peak Systems PCAN PCI cards with two different Jetson TX2 for CAN communication. My setup initializes the channels as follows:

Code: Select all

result = CAN_Initialize(PCAN_PCIBUS1, PCAN_BAUD_500K, 0, 0, 0);
// Similarly, initializing PCAN_PCIBUS2, PCAN_PCIBUS3, etc.
Before sending any data, immediately after initialization, I get the following errors on the buses:

80h: TX | Stuff error
40h: TX | Form error

When I set my device to Listen-Only mode:

Code: Select all

CAN_SetValue(PCAN_PCIBUS1, PCAN_LISTEN_ONLY, &PCAN_PARAMETER_ON, 4);
I can receive messages without any issue, but I am unable to transmit data.

Baudrate is correctly set to 500K on all devices.
If I swap PCAN PCI cards, the issue remains on the same bus.
I have checked ID conflicts and there is none.
Could this be a driver issue or something related to hardware initialization? Any insights would be greatly appreciated.

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN PCI Channel Init Causes Stuff & Form Errors on the Bus

Post by M.Heidemann » Tue 18. Feb 2025, 12:37

Hi,

Just asking as you haven't mentioned it:

What about termination? Is it present?

Furthermore, which driver version are you currently using?

BR

Marvin
---
Marvin Heidemann
PEAK-Support Team

fenasikerim
Posts: 12
Joined: Fri 8. Nov 2024, 11:16

Re: PCAN PCI Channel Init Causes Stuff & Form Errors on the Bus

Post by fenasikerim » Tue 18. Feb 2025, 14:39

I am using version 8.18 and previously tried 8.10.2, but both behaved the same.

I have 120-ohm termination resistors at both ends of the CAN bus (I can successfuly listen the line), but I have not added any termination in my Jetson-PCAN configuration since the device is not at either end of the line.

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN PCI Channel Init Causes Stuff & Form Errors on the Bus

Post by M.Heidemann » Tue 18. Feb 2025, 14:43

Can you parse a output for:

Code: Select all

dmesg
?

I want to see which firmwareversion currently runs on your device.

BR

Marvin
---
Marvin Heidemann
PEAK-Support Team

fenasikerim
Posts: 12
Joined: Fri 8. Nov 2024, 11:16

Re: PCAN PCI Channel Init Causes Stuff & Form Errors on the Bus

Post by fenasikerim » Thu 20. Feb 2025, 08:38

when I write dmesg it shows a lot of irrelevant stuff about v4l2 but i did

dmesg | grep pcan

pcan: Release_20200701_n (le)
pcan: driver config [mod] [isa] [pci] [pec] [dng] [usb]
pcan: 0000:01:00: enabling device (0000 -> 0002)
pcan: 0000:01:00.0: PCAN-miniPCIe FD sub-system id 14h (4 channels)
pcan: - pcie fd device minor 0 found
pcan: - pcie fd device minor 1 found
pcan: - pcie fd device minor 2 found
pcan: - pcie fd device minor 3 found
usbcore: registered new interface driver pcan
pcan: major 505.

Modules linked in: nf_conntrack_netlink nfnetlink br_netfilter .......

also my cat /proc/pcan result with PCAN_LISTEN_ONLY active

$ cat /proc/pcan
*------------- PEAK-System CAN interfaces (www.peak-system.com) -------------
*------------- Release_20200701_n (8.10.2) Jul 9 2021 02:30:17 --------------
*------------- [mod] [isa] [pci] [pec] [dng] [usb] --------------
*--------------------- 4 interfaces @ major 505 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
0 pcifd -NA- aa51000 380 0x001c 00000001 00000000 00000001 00000000 0x0000
1 pcifd -NA- aa52000 380 0x001c 00000001 00000000 00000001 00000000 0x0000
2 pcifd -NA- aa53000 380 0x001c 00000001 00000000 00000001 00000000 0x0000
3 pcifd -NA- aa54000 380 0x001c 00000001 00000000 00000001 00000000 0x0000

Since my jetson TX2 has no internet connection I had to write these with my hand. If you need more info I can provide.

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN PCI Channel Init Causes Stuff & Form Errors on the Bus

Post by M.Heidemann » Thu 20. Feb 2025, 09:31

Hello,

Let's see if using msi fixes this, those channels should have individual IRQs:

Edit /etc/modprobe.d/pcan.conf

# pcan - automatic made entry, begin --------
# if required add options and remove comment
# options pcan type=isa,sp
options pcan usemsi=1
install pcan modprobe --ignore-install pcan
# pcan - automatic made entry, end ----------

2 - unload then reload the driver:

$ sudo rmmod pcan
$ sudo modprobe pcan

Let me know if this worked out for you.

BR

Marvin
---
Marvin Heidemann
PEAK-Support Team

Post Reply