Hello,
I am trying to develop an application based on Linux driver on Raspberry Pi 3B using PEAK PCAN-USB Pro.
Attached are the pictures of both sides of the product I am using.
The questions are:
1. After installing the driver of netdev mode and connecting the device, both chardev node in /dev and netdev link from "ip link show" seem available. Is it normal or something is wrong?
The attached photo pcan-devices.png shows this.
2. When using the C example from the package PCAN-Basic_Linux-4.8.0.5.tar.gz downloaded from this link https://www.peak-system.com/PCAN-Basic.239.0.html?&L=1 to write and read CAN messages (use CAN1 to read and CAN2 to write), I can see these as in attached picture pcan-read-write.png.
a) number of read and write are increasing
b) both channels are active with the same data rate
c) messages on the bus on both channels (from scope)
But the function CAN_read always return empty.
What might be the cause of this?
3. When calculating bit rate, the attached picture pcan-canfd-bitrate.png shows what's in the help document.
It seems the formula is bit_rate = (clock_frequency)/(prescaler * (nom_tse1 + nom_tseg2 + nom_sjw)). Is it the correct formula that data_sjw is also involved in the calculation?
4. Any example for the application which uses socketCAN to read and write?
Thanks!
Crane
questions on PCANbasic on Linux (Raspberry Pi)
questions on PCANbasic on Linux (Raspberry Pi)
- Attachments
-
- CANFD bit rate parameter
- pcan-canfd-bitrate.png (30.43 KiB) Viewed 2672 times
-
- PCAN result of reading and writing
- pcan-read-write.png (79.36 KiB) Viewed 2675 times
-
- PCAN devices
- pcan-devices.png (84.48 KiB) Viewed 2675 times
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: questions on PCANbasic on Linux (Raspberry Pi)
This is a forum - short questions short answers - please contact the support if you have a huge list of questions.
I also removed the pictures with the serial number of the device.
Using PCAN-Basic on Linux - you NEED to use the CharDev driver !! it is not possible to use this API with NetDev !!
See manual - install CharDev Driver and run sample code (which is alsp part of the package)
I also removed the pictures with the serial number of the device.
Using PCAN-Basic on Linux - you NEED to use the CharDev driver !! it is not possible to use this API with NetDev !!
See manual - install CharDev Driver and run sample code (which is alsp part of the package)
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: questions on PCANbasic on Linux (Raspberry Pi)
Topic closed - all answers are part of the manuals.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------