PCAN-miniPCIe FD - IMX6 - kernel 4.9.124
PCAN-miniPCIe FD - IMX6 - kernel 4.9.124
Dear Peak-System team,
I have an imx6 based embedded system on which I would like to use a PCAN-miniPCIe FD.
I have cross compiled the last version of linux driver peak-linux-driver-8.9.0 with degug options.
Then insmod output is:
root@imx6:~# insmod pcan.ko
pcan: loading out-of-tree module taints kernel.
pcan: Release_20190802_n (le)
pcan: driver config [dbg] [mod] [isa] [pci] [pec] [dng] [usb]
pcan: driver start time=1568716297.861856 s.
pcan: DEBUG is switched on
pcan: pcan_pci_register_driver(bf08f29c)
pcan: pcan_usb_register_devices()
usbcore: registered new interface driver pcan
pcan: major 243.
"lspci" tool is not showing the minipcie device.
The problem is the card is not detected in the system.
Please, would you help us?
I attach more information:
Platform: IMX6
Linux kernel version: 4.9.124
Crosscompiler: arm-poky-linux-gnueabi-gcc version=7.3.0
Device info: PCAN-miniPCIe FD Four Channel (IPEH-004047)
https://www.peak-system.com/PCAN-miniPC ... .html?&L=1
Thank you.
Best regards.
I have an imx6 based embedded system on which I would like to use a PCAN-miniPCIe FD.
I have cross compiled the last version of linux driver peak-linux-driver-8.9.0 with degug options.
Then insmod output is:
root@imx6:~# insmod pcan.ko
pcan: loading out-of-tree module taints kernel.
pcan: Release_20190802_n (le)
pcan: driver config [dbg] [mod] [isa] [pci] [pec] [dng] [usb]
pcan: driver start time=1568716297.861856 s.
pcan: DEBUG is switched on
pcan: pcan_pci_register_driver(bf08f29c)
pcan: pcan_usb_register_devices()
usbcore: registered new interface driver pcan
pcan: major 243.
"lspci" tool is not showing the minipcie device.
The problem is the card is not detected in the system.
Please, would you help us?
I attach more information:
Platform: IMX6
Linux kernel version: 4.9.124
Crosscompiler: arm-poky-linux-gnueabi-gcc version=7.3.0
Device info: PCAN-miniPCIe FD Four Channel (IPEH-004047)
https://www.peak-system.com/PCAN-miniPC ... .html?&L=1
Thank you.
Best regards.
Re: PCAN-miniPCIe FD - IMX6 - kernel 4.9.124
Hi,
if the card will not be listed in lspci, there is a problem with your miniPCIe slot on your system. Please check that the slot offers a PCIe interface and not only an USB connection. Our card is a real PCIe device.
regards
Michael
if the card will not be listed in lspci, there is a problem with your miniPCIe slot on your system. Please check that the slot offers a PCIe interface and not only an USB connection. Our card is a real PCIe device.
regards
Michael
Re: PCAN-miniPCIe FD - IMX6 - kernel 4.9.124
Dear Michael.
Thank you for your support.
We need to check our carrier board because the PCAN-miniPCIe FD is detected in development carrier board.
I have questions:
do we have to use the peak-linux-driver-8.x for this PCAN-miniPCIe FD? or
is the driver (PEAK PCAN-PCI/PCIe/miniPCI Cards) in kernel kernel 4.9.124 posible to use for this card model?
Meanwhile I am working in development board.
I have compiled peak-linux-driver-8.9.0 with NETDEV_SUPPORT.
Then I want to test can1 can2 can3 and can4 ports.
Test
-----
1. lspci and driver loading
root@imx6:~# lspci
00:00.0 PCI bridge: Synopsys, Inc. Device abcd (rev 01)
01:00.0 Network controller: PEAK-System Technik GmbH Device 0018 (rev 01)
root@imx6:~# insmod pcan.ko
pcan: loading out-of-tree module taints kernel.
pcan: Release_20190802_n (le)
pcan: driver config [mod] [isa] [pci] [pec] [dng] [usb] [net]
pcan 0000:01:00.0: enabling device (0140 -> 0142)
pcan: uCAN PCI device sub-system id 14h (4 channels)
pcan: uCAN PCB v2h FPGA v3.2.1 (mode 3)
pcan: pci uCAN device minor 0 found
pcan: pci uCAN device minor 1 found
pcan: pci uCAN device minor 2 found
pcan: pci uCAN device minor 3 found
usbcore: registered new interface driver pcan
pcan: registered CAN-FD netdevice can1 for pcifd hw (243,0)
pcan: registered CAN-FD netdevice can2 for pcifd hw (243,1)
pcan: registered CAN-FD netdevice can3 for pcifd hw (243,2)
pcan: registered CAN-FD netdevice can4 for pcifd hw (243,3)
pcan: major 243.
2. can1 and can2 are connected.
3. configure interfaces
ip link set can1 type can bitrate 1000000
ip link set can1 up
ip link set can2 type can bitrate 1000000
ip link set can2 up
ip link set can3 type can bitrate 1000000
ip link set can3 up
ip link set can4 type can bitrate 1000000
ip link set can4 up
3. ifconfig
can1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
can2 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
can3 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
can4 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
4. candump can1
5. cansend can2 01a#CAFEBABE
6. result: can1 is not receiving data
7. candump can2
9. cansend can1 01a#CAFEBABE
8. result: can2 is not receiving data
Please, could you check it?
Thank you.
Best regards.
Paul
Thank you for your support.
We need to check our carrier board because the PCAN-miniPCIe FD is detected in development carrier board.
I have questions:
do we have to use the peak-linux-driver-8.x for this PCAN-miniPCIe FD? or
is the driver (PEAK PCAN-PCI/PCIe/miniPCI Cards) in kernel kernel 4.9.124 posible to use for this card model?
Meanwhile I am working in development board.
I have compiled peak-linux-driver-8.9.0 with NETDEV_SUPPORT.
Then I want to test can1 can2 can3 and can4 ports.
Test
-----
1. lspci and driver loading
root@imx6:~# lspci
00:00.0 PCI bridge: Synopsys, Inc. Device abcd (rev 01)
01:00.0 Network controller: PEAK-System Technik GmbH Device 0018 (rev 01)
root@imx6:~# insmod pcan.ko
pcan: loading out-of-tree module taints kernel.
pcan: Release_20190802_n (le)
pcan: driver config [mod] [isa] [pci] [pec] [dng] [usb] [net]
pcan 0000:01:00.0: enabling device (0140 -> 0142)
pcan: uCAN PCI device sub-system id 14h (4 channels)
pcan: uCAN PCB v2h FPGA v3.2.1 (mode 3)
pcan: pci uCAN device minor 0 found
pcan: pci uCAN device minor 1 found
pcan: pci uCAN device minor 2 found
pcan: pci uCAN device minor 3 found
usbcore: registered new interface driver pcan
pcan: registered CAN-FD netdevice can1 for pcifd hw (243,0)
pcan: registered CAN-FD netdevice can2 for pcifd hw (243,1)
pcan: registered CAN-FD netdevice can3 for pcifd hw (243,2)
pcan: registered CAN-FD netdevice can4 for pcifd hw (243,3)
pcan: major 243.
2. can1 and can2 are connected.
3. configure interfaces
ip link set can1 type can bitrate 1000000
ip link set can1 up
ip link set can2 type can bitrate 1000000
ip link set can2 up
ip link set can3 type can bitrate 1000000
ip link set can3 up
ip link set can4 type can bitrate 1000000
ip link set can4 up
3. ifconfig
can1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
can2 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
can3 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
can4 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
4. candump can1
5. cansend can2 01a#CAFEBABE
6. result: can1 is not receiving data
7. candump can2
9. cansend can1 01a#CAFEBABE
8. result: can2 is not receiving data
Please, could you check it?
Thank you.
Best regards.
Paul
Re: PCAN-miniPCIe FD - IMX6 - kernel 4.9.124
Hi,
PCAN-miniPCIe FD is supported by the kernel since kernel 4.14 or higher. When you use a kernel 4.9 you need to install the peak-linux-driver.
Sure you have a terminated CAN cable between your CAN channels?
regards
Michael
PCAN-miniPCIe FD is supported by the kernel since kernel 4.14 or higher. When you use a kernel 4.9 you need to install the peak-linux-driver.
Sure you have a terminated CAN cable between your CAN channels?
regards
Michael
Re: PCAN-miniPCIe FD - IMX6 - kernel 4.9.124
Hi,
We have soldered fields acording the document (page 14) "PCAN-miniPCIe FD – User Manual" Figure 9 - Document version 1.2.0 (2019-09-10).
I attach photos.
Thank you.
Best regards.
We have soldered fields acording the document (page 14) "PCAN-miniPCIe FD – User Manual" Figure 9 - Document version 1.2.0 (2019-09-10).
I attach photos.
Thank you.
Best regards.
- Attachments
-
- P2.JPG (94.95 KiB) Viewed 11325 times
-
- P1.JPG (170.12 KiB) Viewed 11325 times
Re: PCAN-miniPCIe FD - IMX6 - kernel 4.9.124
Hi
Sorry, the page in document is 17 and the figure 9 (Internal termination)
Thank you.
best regard
Sorry, the page in document is 17 and the figure 9 (Internal termination)
Thank you.
best regard
Re: PCAN-miniPCIe FD - IMX6 - kernel 4.9.124
Hi,
it is not a good idea to solder on the cards (you can damage parts), it will be a better option to use CAN cables with 120 Ohm resistors outside of the card or use those mini-termination adapters we offer. Please measure the resistance of your CAN bus cables, while the cards are powered off.
regards
Michael
it is not a good idea to solder on the cards (you can damage parts), it will be a better option to use CAN cables with 120 Ohm resistors outside of the card or use those mini-termination adapters we offer. Please measure the resistance of your CAN bus cables, while the cards are powered off.
regards
Michael
Re: PCAN-miniPCIe FD - IMX6 - kernel 4.9.124
Hi.
The resistance value is approximately 124 Ω
Thank you.
Best regards.
The resistance value is approximately 124 Ω
Thank you.
Best regards.
Re: PCAN-miniPCIe FD - IMX6 - kernel 4.9.124
Hi,
you should measure around 60 ohms when both channels are terminated!
Please check your CAN cable again, that CAN-H and CAN-L are connected 1:1.
regards
Michael.
you should measure around 60 ohms when both channels are terminated!
Please check your CAN cable again, that CAN-H and CAN-L are connected 1:1.
regards
Michael.
Re: PCAN-miniPCIe FD - IMX6 - kernel 4.9.124
Hi Michael.
Yes, this is correct.
Thank you.
Best regards
Yes, this is correct.
But the problem is i can't sent data. When i run cansend can1 01a#CAFEBABE, the data are not appear in the osciloscope. I thing maybe the kernel module configuration or the compilation options are wrong. Or the procedure to sent data is not correct.M.Maidhof wrote:Hi,
you should measure around 60 ohms when both channels are terminated!
Please check your CAN cable again, that CAN-H and CAN-L are connected 1:1.
regards
Michael.
Thank you.
Best regards