Go to advanced search

by Zeta
Tue Feb 18, 2014 7:20 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

I eventually got it so it would dump out 3-20+ frames, then it would be quiet. Looks like you are using the "mcp251x" driver and not the "mcp2515" (with a 5 in place of the x) one ? If so, it is a know problem presented a lot of time in this thread... If not, then you should provide some more infor...
by Zeta
Thu Feb 06, 2014 9:19 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

20 MHz, but the problem not only in frequency, but in signal length too. From the datasheet (http://ww1.microchip.com/downloads/en/DeviceDoc/21801G.pdf) max SPI speed is 10 MHz. I found only the baudrate of CAN signal adjusting. I can set it in /etc/network/interfaces. And on schematic I use 16 MHz...
by Zeta
Wed Feb 05, 2014 6:46 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

It appears so, that raspberry SPI signal runs 10 times faster than arduino spi signal on same CAN bitrate. Comparing is good, but measuring would have been better... Which frequency was the SPI signal on the raspi ? Probably mcp2515 with its 10 MHz SPI just can't catch the signal The MCP2515 datash...
by Zeta
Tue Feb 04, 2014 10:28 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

my driver doesn't support the loopback. Ok, thats a good to know. To be clear (words are tricky there), the hardware driver (the MCP2515 chip) supports it, but it is the "optimized" software driver that doesn't support it (the older one supports it but is a bit broken on new hardware). Do I need a ...
by Zeta
Tue Feb 04, 2014 9:44 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

Ps. Can I use the loopback mode without a connected mcp251x? No : the loopback mode is running inside the MCP2515 and allows to check the communication with it. Also take care that the mcp2515 optimised driver doesn't support loopback mode. Only the old mcp251x driver supports it, but has troubles ...
by Zeta
Mon Jan 27, 2014 11:33 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

When i connect my mcp2515 to an oscilloscope(?) and send one package, i get a unstable line, that not ends, like it keeps sending the same package on and on and on. As you don't have another CAN device to acknoledge this sent message, the driver constantly retries to send it. The behavior is normal...
by Zeta
Thu Dec 12, 2013 6:41 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

Hi Shan, which programming platform (C++, or Python) should i use to do this job.... The one you are the most comfortable with ? Plain C is enough for a simple task like answering to a message. Take a look at the messages above, (with the link to wikipedia) for some examples. If you want to do more ...
by Zeta
Wed Dec 11, 2013 8:08 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

I am relatively new to Raspberry Pi world [...] So, Can you help me how to compile the kernel for CAN communication in a stepwise manner...... Hello Shan, Why not starting with one of the precompiled version available in the previous pages of this thread ? If you make it work and need to add someth...
by Zeta
Tue Dec 03, 2013 6:57 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

So I am now thinking of a setup with a tiny micro processor that could handle up to 3 MCP2515 with hard realtime setup and feed them to the Linux kernel in an optimized way, so that the kernel would just need to do long reads/writes of just messages which is much better handled than the "get status...
by Zeta
Thu Nov 28, 2013 7:21 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

For people that don't speak german, the official documentation of SocketCAN is in the kernel source, and well written: https://www.kernel.org/doc/Documentation/networking/can.txt The wiki page took the gist of it to provide a working code example, which is enough to start, but all details of it are ...
by Zeta
Sun Nov 24, 2013 2:33 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

The same issue. I have connected Raspberry with this adapter (http://lnxpps.de/rpie/) to Audi Infotainment CAN bus and I can't see any messages :( Sending and receiving messages on the loopback works fine... If the loopback mode works, then at least the raspberry pi and adapter works. So the proble...
by Zeta
Sat Nov 23, 2013 9:27 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

Hello to all ! I've been and lot busy and a bit sick, so not much progress on my side about the packaging. I still manage to package the can-utils programs using the proposed package mentioned here : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=568303. Here are the instructions to build it (and ...
by Zeta
Tue Nov 12, 2013 11:25 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 137167

Re: SPI driver latency and a possible solution

@Zeta: thanks for the offer - I would recommend to wait a bit so that I can prepare a test that makes it easy to "test" without a connected SPI-device... I need to write a test spi device anyway, that will be producing repeatable IO-pattern to measure how much the System improves compared to the "o...
by Zeta
Mon Nov 11, 2013 9:23 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 137167

Re: SPI driver latency and a possible solution

msperl wrote:A high-speed oscilloscope (>500MHz sample rate - the more the better) would be welcome to see if there are any other glitches in CS...
I'll take a look at work tomorrow, but I am not sure we have one that goes that high... I'll keep you informed.
by Zeta
Sat Nov 09, 2013 12:11 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 137167

Re: SPI driver latency and a possible solution

Hello Martin, I start to fear that there is some chipselect glitch where CS goes up momentarily during the switch from read to write (say below 0,1us)... Something where the mcp2515 might less sensible... I wish I had a fast oscilloscope to check that this is not true... I am not 100% sure, but if t...
by Zeta
Fri Nov 08, 2013 8:30 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

I let my rpi run the whole afternoon with the kernel for which I provided the debian package in the message above with success. I am looking at the can-utils package right now (which contains cansend, ...). It has already been started but it seems it never reached the debian distribution: http://bug...
by Zeta
Fri Nov 08, 2013 7:04 pm
Forum: Raspbian
Topic: Raspbian Kernel Source
Replies: 16
Views: 54311

Re: Raspbian Kernel Source

Hello Walt, Thanks for your help, but the problem I am trying to solve here is not how to compile or cross-compile the kernel, but how to package it correctly as a debian source package, and a debian binary package for the compiled version. The source package would allow to later compile some module...
by Zeta
Thu Nov 07, 2013 11:52 pm
Forum: Raspbian
Topic: Raspbian Kernel Source
Replies: 16
Views: 54311

Re: Raspbian Kernel Source

Hello plugwash ! As we are talking, I first would like to thank you for your great work on Raspbian ! About the kernel packaging, I made one package this night, and while I didn't yet tested everything with it, it seems to work correctly. However, it is probably not the "debian way" Here are the ste...
by Zeta
Thu Nov 07, 2013 11:22 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

Hello, Good news, my Pi finally managed to compile a kernel this night and package it to a deb file. I have only made a quick test of it now, so I am still not sure everything works correctly. So far, it boots and loads the modules for the can0 and a Wifi dongle. I can use it correctly from ssh, so ...
by Zeta
Wed Nov 06, 2013 10:10 pm
Forum: Raspbian
Topic: Raspbian Kernel Source
Replies: 16
Views: 54311

Re: Raspbian Kernel Source

Hello Gerd, I found a shorter way to get the kernel commit hash without needing to clone locally the firmware git repository, using direct download of a file from github website: FIRMWARE_HASH=$(zgrep "* firmware as of" /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | head -1 | awk '{ pri...
by Zeta
Tue Nov 05, 2013 11:34 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

Hi, WARNING : What follows is work in progress, which is not yet an acceptable solution for me as it is now. If you don't know what you are doing, then follow the instructions some messages above to extract Gerd's archive directly, which we know works well (and is as easy). Quick status of my new tr...
by Zeta
Tue Oct 29, 2013 10:02 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

I didn't expected, that you would like to compile the kernel. I just thought, that you take the tar archive and make a binary debian package of this. Did you took the exact kernel source as the Raspbian distribution ? While looking at how to make a debian package (it is my first .deb, but already p...
by Zeta
Mon Oct 28, 2013 11:48 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

Martin, Gerd, A quick update about my tinkering with debian kernel packages : It works ! I have not made anything special yet, only took the kernel source from the raspberry pi github and built it as a debian package, then installed it on the pi using the package manager, and rebooted to it. I gave ...
by Zeta
Sun Oct 27, 2013 4:47 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

Do we need to send out CAN-messages in correct sequence under any circumstances? The question why I ask is because it should normally work "fine" if you send up to 3 CAN messages in a row, but as soon as you exceed that you may run into reordering issues due to the way that the HW works. If this is...
by Zeta
Thu Oct 24, 2013 9:50 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 343195

Re: CAN controller

Ok, I found out the trick about the modinfo. I took a look at both the mcp251x and mcp2515 source code. What is missing in the mcp2515 is the following snippet: // Enumeration of all devices supported by this driver. // There is only one device for the mcp2515, but I kept the principle of the enum t...

Go to advanced search