Hello to everyone,
I'm struggling with making CAN interface work in am3517 evm Linux kernel (version 2.6.32-rc5). I've installed successfully drivers for Peak PCAN PCI-E card on a host side (Ubuntu 10.10) and made a connection with a proper cable to the target side (CAN headers, J15). But I'm not managing to make that communication work. Here are some more details hoping someone could help me.
Currently I'm using the given (default) and already loaded configurations for Linux kernel and the U-Boot software. And also CodeSourcery tools for cross-compilation.
To test if communication works I've written a simple test application which sends some data (from target to host) using the SocketCAN. But as you've already guessed it doesn't work. It just fails to send the data and gives me the message Network is down. That seems perfectly valid as there's no CAN interface in the list after executing the command ifconfig. Similarly as I have been enabling the CAN interface on the host side, I tried pretty much the same on the target side just by typing ifconfig can0 up which generated the following errors:
ti_hecc ti_hecc.1: bit-timing not yet defined
ti_hecc ti_hecc.1: open_candev() failed -22
ifconfig: SIOCSIFFLAGS: Invalid argument
As that didn't work I referred to your CAN HECC Linux Manual (http://processors.wiki.ti.com/index.php/Sitara_AM35x_CAN_%28HECC%29_Linux_Driver) which gave me some answers but still didn't solve the problem. I can see that you recommend the ip(route2) utility for bringing up the CAN interface. That means that I need the cross-compiled version which I'm not able to find anywhere and to make one by myself I find it not very trivial. Is there any cross-compiled versions around? And more important, is this is a right way to solve my problem? Or perhaps is there any other way to make these things work?
Also is there any way to check the current target kernel configuration to see what modules are enabled/disabled because /usr/src/ folder is empty? I believe that CAN module should be enabled by default but that's just one of the things that crossed my mind.
Thank you very much for your time and help,
Adi
P.S. there's boot log attached just in case for more details needed.