bus speeds

This forum covers PCAN-Linux and Linux development issues concerning our products

bus speeds

Postby rwbruce » Fri 21. Oct 2011, 21:37

Greetings,

I have two USB/CAN devices connected to a Linux system. /proc/pcan shows devices can0 and can1. can0 must operate at 1-M bit rate and can1 must operate at 250-K bit rate. I passed option bitrate=0x0014 to the driver, so I am able to prove that the software and hardware are functional at 1-M bit rate using can0. I assume this sets both devices to the same rate. How do I set the devices at different rates?

Thanks.
Bill Bruce
Watlow Controls
Winona, MN, USA
rwbruce
 
Posts: 3
Joined: Fri 21. Oct 2011, 21:19

Re: bus speeds

Postby M.Maidhof » Mon 24. Oct 2011, 10:02

Hi,

please see our linux driver manual in pdf format on page 22:

example:

echo "i 0x0014 e" > /dev/pcan32

echo "i 0x011C e" > /dev/pcan33

You have to use the chardev devices to set the baudrate of the used Netdev devices.

regards

Michael
M.Maidhof
Support
Support
 
Posts: 356
Joined: Wed 22. Sep 2010, 14:00
Location: Darmstadt, Germany

Re: bus speeds

Postby rwbruce » Mon 24. Oct 2011, 18:36

OK. Thanks for the reply.

Bill Bruce
rwbruce
 
Posts: 3
Joined: Fri 21. Oct 2011, 21:19

Re: bus speeds

Postby rwbruce » Mon 24. Oct 2011, 23:19

Michael,

echo "i 0x0014 e" > /dev/pcan32

echo "i 0x011C e" > /dev/pcan33

----

Am I correct that the 'e' at the end of these strings places the device in 29-bit address mode?

If can0 is 1-M, 11-bit address and can1 is 250-K, 29-bit address, would the commands be as follows?

echo "i 0x0014 s" > /dev/pcan32

echo "i 0x011C e" > /dev/pcan33

I'm looking at the table on page 32 of the manual.

Thanks.
Bill Bruce
rwbruce
 
Posts: 3
Joined: Fri 21. Oct 2011, 21:19

Re: bus speeds

Postby M.Maidhof » Tue 25. Oct 2011, 09:52

Hi Bruce,

when you use 11Bit "standard" CAN frames you can just omit the "e" option.

echo "i 0x0014" > /dev/pcan32

echo "i 0x011C e" > /dev/pcan33

regards

Michael
M.Maidhof
Support
Support
 
Posts: 356
Joined: Wed 22. Sep 2010, 14:00
Location: Darmstadt, Germany

Re: bus speeds

Postby alirezan1 » Wed 12. Mar 2014, 02:31

so it is not possible to read both 11bit and 29bit data that are on the bus at the same time? Can you please explain how it is possible to read both 11 and 29 bits that are on the buses of some vehicles?
Thanks
alirezan1
 
Posts: 1
Joined: Wed 12. Mar 2014, 02:23

Re: bus speeds

Postby M.Maidhof » Wed 12. Mar 2014, 11:08

Hi,

when enabling extended frames, you could also receive standard frames.

regards

Michael
M.Maidhof
Support
Support
 
Posts: 356
Joined: Wed 22. Sep 2010, 14:00
Location: Darmstadt, Germany


Return to Linux